summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2009-07-22 11:15:23 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2009-07-22 11:15:23 -0700
commit9c53a5c01f7d9e2ffe93cc7ca03cac9c71968484 (patch)
tree22023d1b8929f21e3d694fd924f2df1b6fbc8a2a /core/java/android/speech
parentaa0e47cbd6ccada9d194f39e6b4372d2d3594b38 (diff)
downloadframeworks_base-9c53a5c01f7d9e2ffe93cc7ca03cac9c71968484.zip
frameworks_base-9c53a5c01f7d9e2ffe93cc7ca03cac9c71968484.tar.gz
frameworks_base-9c53a5c01f7d9e2ffe93cc7ca03cac9c71968484.tar.bz2
Resetting the setLanguage() call to its intended behavior after change 8089
which works around the bug where a language cannot be set if the default language (which is loaded upon initialization) isn't eng-USA.
Diffstat (limited to 'core/java/android/speech')
-rwxr-xr-xcore/java/android/speech/tts/TextToSpeech.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index bb6b4b0..8f8d976 100755
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -921,8 +921,10 @@ public class TextToSpeech {
mCachedParams[Engine.TTS_PARAM_POSITION_LANGUAGE + 1] = loc.getISO3Language();
mCachedParams[Engine.TTS_PARAM_POSITION_COUNTRY + 1] = loc.getISO3Country();
mCachedParams[Engine.TTS_PARAM_POSITION_VARIANT + 1] = loc.getVariant();
-
- result = mITts.setLanguage(mPackageName,
+ // the language is not set here, instead it is cached so it will be associated
+ // with all upcoming utterances. But we still need to report the language support,
+ // which is achieved by calling isLanguageAvailable()
+ result = mITts.isLanguageAvailable(
mCachedParams[Engine.TTS_PARAM_POSITION_LANGUAGE + 1],
mCachedParams[Engine.TTS_PARAM_POSITION_COUNTRY + 1],
mCachedParams[Engine.TTS_PARAM_POSITION_VARIANT + 1] );