summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2010-02-17 13:56:27 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-02-17 13:56:27 -0800
commit8a7e63a0a9e752990f195880d462166904f72476 (patch)
tree0cc564a30b61b53aac5859960874408fb1c9bc3b
parent5435511ee9151dbca8ad13656b3dc20ec79f940b (diff)
parent7330a88b79eef060486623989ccdc1dcc291e014 (diff)
downloadpackages_apps_settings-8a7e63a0a9e752990f195880d462166904f72476.zip
packages_apps_settings-8a7e63a0a9e752990f195880d462166904f72476.tar.gz
packages_apps_settings-8a7e63a0a9e752990f195880d462166904f72476.tar.bz2
Merge "Fix bug 2446811 Ensure the default locale is never constructed with a null string."
-rw-r--r--src/com/android/settings/TextToSpeechSettings.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/settings/TextToSpeechSettings.java b/src/com/android/settings/TextToSpeechSettings.java
index 86f9919..3c55d10 100644
--- a/src/com/android/settings/TextToSpeechSettings.java
+++ b/src/com/android/settings/TextToSpeechSettings.java
@@ -265,9 +265,15 @@ public class TextToSpeechSettings extends PreferenceActivity implements
if (status == TextToSpeech.SUCCESS) {
Log.v(TAG, "TTS engine for settings screen initialized.");
mEnableDemo = true;
- if (mDefaultLanguage == null){
+ if (mDefaultLanguage == null) {
mDefaultLanguage = Locale.getDefault().getISO3Language();
}
+ if (mDefaultCountry == null) {
+ mDefaultCountry = Locale.getDefault().getISO3Country();
+ }
+ if (mDefaultLocVariant == null) {
+ mDefaultLocVariant = new String();
+ }
mTts.setLanguage(new Locale(mDefaultLanguage, mDefaultCountry, mDefaultLocVariant));
mTts.setSpeechRate((float)(mDefaultRate/100.0f));
} else {