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,8 +425,10 @@ public class TextToSpeechSettings extends PreferenceActivity implements
// update the demo string
mDemoStringIndex = mDefaultLocPref.findIndexOfValue(mDefaultLanguage + LOCALE_DELIMITER
+ mDefaultCountry);
if (mDemoStringIndex > -1){
mDefaultLocPref.setValueIndex(mDemoStringIndex);
}
}
/**
* (helper function for initDefaultLang() )