Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
650f1ab027
3 changed files with 9 additions and 3 deletions
|
@ -410,9 +410,6 @@ public class OsmandApplication extends MultiDexApplication {
|
|||
}
|
||||
|
||||
} else {
|
||||
// Test for Issues #1351 and #2810
|
||||
//player = null;
|
||||
|
||||
if (player == null || !Algorithms.objectEquals(voiceProvider, player.getCurrentVoice()) || force) {
|
||||
appInitializer.initVoiceDataInDifferentThread(uiContext, voiceProvider, run, showDialog);
|
||||
}
|
||||
|
|
|
@ -61,6 +61,11 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen
|
|||
if (mediaPlayer != null){
|
||||
mediaPlayer.stop();
|
||||
}
|
||||
// TODO: Issue #2810: Audio focus issues when ongoing prompt is interrupted by stop(), i.e. when off-route is detected. Temp workaround is to nullify and always re-init player.
|
||||
//if (ctx != null && ctx.getSettings().AUDIO_STREAM_GUIDANCE.get() == 0) {
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
//}
|
||||
if (ctx != null) {
|
||||
abandonAudioFocus();
|
||||
}
|
||||
|
|
|
@ -134,6 +134,10 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
if (mTts != null){
|
||||
mTts.stop();
|
||||
}
|
||||
// TODO: Issue #2810: Audio focus issues when ongoing prompt is interrupted by stop(), i.e. when off-route is detected. Temp workaround is to nullify and always re-init player.
|
||||
//if (ctx != null && ctx.getSettings().AUDIO_STREAM_GUIDANCE.get() == 0) {
|
||||
mTts = null;
|
||||
//}
|
||||
if (ctx != null) {
|
||||
abandonAudioFocus();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue