diff --git a/android/app/src/main/java/app/organicmaps/sound/TtsPlayer.java b/android/app/src/main/java/app/organicmaps/sound/TtsPlayer.java index d4911152d5..a0ec5aef67 100644 --- a/android/app/src/main/java/app/organicmaps/sound/TtsPlayer.java +++ b/android/app/src/main/java/app/organicmaps/sound/TtsPlayer.java @@ -164,7 +164,14 @@ public enum TtsPlayer } @Override - public void onError(String utteranceId) { + @SuppressWarnings("deprecated") // abstract method must be implemented + public void onError(String utteranceId) + { + mAudioFocusManager.releaseAudioFocus(); + } + + @Override + public void onError(String utteranceId, int errorCode) { mAudioFocusManager.releaseAudioFocus(); } });