summaryrefslogtreecommitdiffstats
path: root/pico
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2012-01-06 12:16:49 +0000
committerNarayan Kamath <narayan@google.com>2012-01-06 12:16:49 +0000
commit6ef96dd288920df1831f67b6261a64e3034567c0 (patch)
tree9a6b6ca33cb52413b1c81abf1c079f11be07f4c3 /pico
parent9f6a1b7e86f22197609c851a45e99933402a2ff7 (diff)
downloadexternal_svox-6ef96dd288920df1831f67b6261a64e3034567c0.zip
external_svox-6ef96dd288920df1831f67b6261a64e3034567c0.tar.gz
external_svox-6ef96dd288920df1831f67b6261a64e3034567c0.tar.bz2
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
Diffstat (limited to 'pico')
-rwxr-xr-xpico/compat/src/com/android/tts/compat/CompatTtsService.java5
1 files changed, 4 insertions, 1 deletions
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;
}