]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Fix condition for TTS not available.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Fri, 12 Feb 2016 21:13:50 +0000 (22:13 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Fri, 12 Feb 2016 21:13:50 +0000 (22:13 +0100)
Only used for the log message, but it would incorrectly
always claim that TTS was not available.

src/com/hughes/android/dictionary/DictionaryActivity.java

index bc9932c4073c57fef469035e4d5203abb0648d92..e00f5ddf765466475a7fc605f18c9a48fee37cce 100644 (file)
@@ -667,7 +667,7 @@ public class DictionaryActivity extends ActionBarActivity {
         final Locale locale = new Locale(index.sortLanguage.getIsoCode());
         Log.d(LOG, "Setting TTS locale to: " + locale);
         final int ttsResult = textToSpeech.setLanguage(locale);
-        if (ttsResult != TextToSpeech.LANG_AVAILABLE ||
+        if (ttsResult != TextToSpeech.LANG_AVAILABLE &&
                 ttsResult != TextToSpeech.LANG_COUNTRY_AVAILABLE) {
             Log.e(LOG, "TTS not available in this language: ttsResult=" + ttsResult);
         }