From f83ff233e48df1acfe2a3cad2f56a89072fde946 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Fri, 12 Feb 2016 22:13:50 +0100 Subject: [PATCH] Fix condition for TTS not available. Only used for the log message, but it would incorrectly always claim that TTS was not available. --- src/com/hughes/android/dictionary/DictionaryActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.43.0