Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2015-08-28 15:51:43 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:03:04 +0300
commit7ba9def334ad88a6977e70730acf96849c8f2ce3 (patch)
tree04dd22714681bee31dde46e8efce38d5f21343b4 /android
parent77bccc201ded6cc2f40ee392532ef7f05fdc043f (diff)
Moving up the flag mIsLocaleChanging to the top of method onInit.
Diffstat (limited to 'android')
-rw-r--r--android/src/com/mapswithme/maps/sound/TtsPlayer.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/android/src/com/mapswithme/maps/sound/TtsPlayer.java b/android/src/com/mapswithme/maps/sound/TtsPlayer.java
index f39e4d8d1f..2a49eb80d8 100644
--- a/android/src/com/mapswithme/maps/sound/TtsPlayer.java
+++ b/android/src/com/mapswithme/maps/sound/TtsPlayer.java
@@ -71,10 +71,10 @@ public enum TtsPlayer
public void onInit(int status)
{
// This method is called asynchronously.
+ mIsLocaleChanging = false;
if (status == TextToSpeech.ERROR)
{
Log.w(TAG, "Can't initialize TextToSpeech for locale " + locale.getLanguage() + " " + locale.getCountry());
- mIsLocaleChanging = false;
return;
}
@@ -95,7 +95,6 @@ public enum TtsPlayer
" and for the default locale " + DEFAULT_LOCALE.getLanguage() + " " + DEFAULT_LOCALE.getCountry() +
". TTS will be switched off.");
mTtsLocale = null;
- mIsLocaleChanging = false;
return;
}
@@ -104,7 +103,6 @@ public enum TtsPlayer
// It should be fixed.
nativeSetTurnNotificationsLocale(mTtsLocale.getLanguage());
Log.i(TAG, "setLocaleIfAvailable() onInit nativeSetTurnNotificationsLocale(" + mTtsLocale.getLanguage() + ")");
- mIsLocaleChanging = false;
}
});
}
@@ -128,7 +126,7 @@ public enum TtsPlayer
public void speak(String[] turnNotifications)
{
if (!readyToPlay())
- return; // speakNotifications() is called while TTS is not ready or could not be initialized.
+ return; // speak() is called while TTS is not ready or could not be initialized.
if (turnNotifications == null)
return;