SDK: Fix CustomLocale to properly setup Language+Country
SDK BUG 2154263 Change-Id: I74db5bc237921ff6a6fd55664a2a3c62f544081b
This commit is contained in:
@@ -289,7 +289,15 @@ public class CustomLocaleActivity extends ListActivity {
|
|||||||
IActivityManager am = ActivityManagerNative.getDefault();
|
IActivityManager am = ActivityManagerNative.getDefault();
|
||||||
Configuration config = am.getConfiguration();
|
Configuration config = am.getConfiguration();
|
||||||
|
|
||||||
Locale loc = new Locale(locale);
|
Locale loc = null;
|
||||||
|
|
||||||
|
String[] langCountry = locale.split("_");
|
||||||
|
if (langCountry.length == 2) {
|
||||||
|
loc = new Locale(langCountry[0], langCountry[1]);
|
||||||
|
} else {
|
||||||
|
loc = new Locale(locale);
|
||||||
|
}
|
||||||
|
|
||||||
config.locale = loc;
|
config.locale = loc;
|
||||||
|
|
||||||
// indicate this isn't some passing default - the user wants this
|
// indicate this isn't some passing default - the user wants this
|
||||||
|
|||||||
Reference in New Issue
Block a user