Merge "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 17:13:12 -08:00
committed by Android (Google) Code Review

View File

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