Bug 1101527 - Don't set locales after Gecko startup. r=nchen,bnicholson

This commit is contained in:
Richard Newman 2014-11-24 22:16:26 -08:00
Родитель 9db3e99d51
Коммит 8f7dccffa3
1 изменённых файлов: 8 добавлений и 14 удалений

Просмотреть файл

@ -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;
}