From: Reimar Döffinger Date: Fri, 12 Feb 2016 21:13:50 +0000 (+0100) Subject: Fix condition for TTS not available. X-Git-Url: http://gitweb.fperrin.net/?p=Dictionary.git;a=commitdiff_plain;h=f83ff233e48df1acfe2a3cad2f56a89072fde946 Fix condition for TTS not available. Only used for the log message, but it would incorrectly always claim that TTS was not available. --- diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index bc9932c..e00f5dd 100644 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -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); }