Fixing bug 2418114. Added a check to make sure the TTS sample string for

a language-country combination is available before trying to use it.
This commit is contained in:
Charles Chen
2010-02-04 15:52:30 -08:00
parent 61daf83ca8
commit 8a37e6190b

View File

@@ -425,7 +425,9 @@ public class TextToSpeechSettings extends PreferenceActivity implements
// update the demo string // update the demo string
mDemoStringIndex = mDefaultLocPref.findIndexOfValue(mDefaultLanguage + LOCALE_DELIMITER mDemoStringIndex = mDefaultLocPref.findIndexOfValue(mDefaultLanguage + LOCALE_DELIMITER
+ mDefaultCountry); + mDefaultCountry);
mDefaultLocPref.setValueIndex(mDemoStringIndex); if (mDemoStringIndex > -1){
mDefaultLocPref.setValueIndex(mDemoStringIndex);
}
} }
/** /**