Normalize TTS default locale before #toDisplayString
TTS is... special in regard of Locale instances it uses. Recently ISO-3166 alpha 3 country codes went out of spec, so "English (GBR)". Bug: 15741357 Change-Id: I022105acad9d319d5e09231be340405d797c84c4
This commit is contained in:
@@ -268,7 +268,9 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment implements
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mCurrentDefaultLocale = defaultLocale;
|
// ISO-3166 alpha 3 country codes are out of spec. If we won't normalize,
|
||||||
|
// we may end up with English (USA)and German (DEU).
|
||||||
|
mCurrentDefaultLocale = mEnginesHelper.parseLocaleString(defaultLocale.toString());
|
||||||
|
|
||||||
int defaultAvailable = mTts.setLanguage(defaultLocale);
|
int defaultAvailable = mTts.setLanguage(defaultLocale);
|
||||||
if (evaluateDefaultLocale()) {
|
if (evaluateDefaultLocale()) {
|
||||||
|
Reference in New Issue
Block a user