summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/speech/tts/TextToSpeech.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 02152fb..327c59a 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -1500,11 +1500,13 @@ public class TextToSpeech {
try {
mService.setCallback(getCallerIdentity(), mCallback);
- String[] defaultLanguage = mService.getClientDefaultLanguage();
- mParams.putString(Engine.KEY_PARAM_LANGUAGE, defaultLanguage[0]);
- mParams.putString(Engine.KEY_PARAM_COUNTRY, defaultLanguage[1]);
- mParams.putString(Engine.KEY_PARAM_VARIANT, defaultLanguage[2]);
+ if (mParams.getString(Engine.KEY_PARAM_LANGUAGE) == null) {
+ String[] defaultLanguage = mService.getClientDefaultLanguage();
+ mParams.putString(Engine.KEY_PARAM_LANGUAGE, defaultLanguage[0]);
+ mParams.putString(Engine.KEY_PARAM_COUNTRY, defaultLanguage[1]);
+ mParams.putString(Engine.KEY_PARAM_VARIANT, defaultLanguage[2]);
+ }
Log.i(TAG, "Set up connection to " + mName);
return SUCCESS;