mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 1101527 - Don't set locales after Gecko startup. r=nchen,bnicholson
This commit is contained in:
parent
9db3e99d51
commit
8f7dccffa3
@ -88,18 +88,19 @@ public class GeckoThread extends Thread implements GeckoEventListener {
|
||||
}
|
||||
|
||||
private String initGeckoEnvironment() {
|
||||
// At some point while loading the gecko libs our default locale gets set
|
||||
// so just save it to locale here and reset it as default after the join
|
||||
Locale locale = Locale.getDefault();
|
||||
final Locale locale = Locale.getDefault();
|
||||
|
||||
final Context context = GeckoAppShell.getContext();
|
||||
final Resources res = context.getResources();
|
||||
if (locale.toString().equalsIgnoreCase("zh_hk")) {
|
||||
locale = Locale.TRADITIONAL_CHINESE;
|
||||
Locale.setDefault(locale);
|
||||
final Locale mappedLocale = Locale.TRADITIONAL_CHINESE;
|
||||
Locale.setDefault(mappedLocale);
|
||||
Configuration config = res.getConfiguration();
|
||||
config.locale = mappedLocale;
|
||||
res.updateConfiguration(config, null);
|
||||
}
|
||||
|
||||
Context context = GeckoAppShell.getContext();
|
||||
String resourcePath = "";
|
||||
Resources res = null;
|
||||
String[] pluginDirs = null;
|
||||
try {
|
||||
pluginDirs = GeckoAppShell.getPluginDirectories();
|
||||
@ -108,7 +109,6 @@ public class GeckoThread extends Thread implements GeckoEventListener {
|
||||
}
|
||||
|
||||
resourcePath = context.getPackageResourcePath();
|
||||
res = context.getResources();
|
||||
GeckoLoader.setupGeckoEnvironment(context, pluginDirs, context.getFilesDir().getPath());
|
||||
|
||||
GeckoLoader.loadSQLiteLibs(context, resourcePath);
|
||||
@ -116,12 +116,6 @@ public class GeckoThread extends Thread implements GeckoEventListener {
|
||||
GeckoLoader.loadGeckoLibs(context, resourcePath);
|
||||
GeckoJavaSampler.setLibsLoaded();
|
||||
|
||||
Locale.setDefault(locale);
|
||||
|
||||
Configuration config = res.getConfiguration();
|
||||
config.locale = locale;
|
||||
res.updateConfiguration(config, null);
|
||||
|
||||
return resourcePath;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user