summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Android (Google) Code Review <android-gerrit@google.com> 2009-07-22 11:48:11 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2009-07-22 11:48:11 -0700
commit7228d0fdd7fd151f033b09044a9ba94b2bc06b74 (patch)
tree5587f1ebf90fdcf0b87ce82fc35226b87faa8d92
parent26654274905961835a36dbcfe98dc745e8beefbf (diff)
parent9c53a5c01f7d9e2ffe93cc7ca03cac9c71968484 (diff)
Merge change 8213 into donut
* changes: 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.
-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 bb6b4b0385d8..8f8d976858d7 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] );