From 6ef96dd288920df1831f67b6261a64e3034567c0 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Fri, 6 Jan 2012 12:16:49 +0000 Subject: Fix onLoadLanguage, should actually load the language. Would still work earlier because onSynthesizeText would load the right language, but getLanguage() would return the wrong language. Change-Id: Ic0e65ca3725aa1c06bf6eed88eaf823671477932 --- pico/compat/src/com/android/tts/compat/CompatTtsService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pico') diff --git a/pico/compat/src/com/android/tts/compat/CompatTtsService.java b/pico/compat/src/com/android/tts/compat/CompatTtsService.java index af65ba4..475afaf 100755 --- a/pico/compat/src/com/android/tts/compat/CompatTtsService.java +++ b/pico/compat/src/com/android/tts/compat/CompatTtsService.java @@ -101,7 +101,10 @@ public abstract class CompatTtsService extends TextToSpeechService { protected int onLoadLanguage(String lang, String country, String variant) { if (DBG) Log.d(TAG, "onLoadLanguage(" + lang + "," + country + "," + variant + ")"); int result = onIsLanguageAvailable(lang, country, variant); - // TODO: actually load language + if (result >= TextToSpeech.LANG_AVAILABLE) { + mNativeSynth.setLanguage(lang, country, variant); + } + return result; } -- cgit v1.1