am ef133787: SDK: Fix CustomLocale to properly setup Language+Country
Merge commit 'ef1337876b2dfbf76dc7e45e035f4a25ebc0f560' * commit 'ef1337876b2dfbf76dc7e45e035f4a25ebc0f560': SDK: Fix CustomLocale to properly setup Language+Country
This commit is contained in:
@@ -289,7 +289,15 @@ public class CustomLocaleActivity extends ListActivity {
|
||||
IActivityManager am = ActivityManagerNative.getDefault();
|
||||
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;
|
||||
|
||||
// indicate this isn't some passing default - the user wants this
|
||||
|
||||
Reference in New Issue
Block a user