Bug 732572: Restart the entire application on locale change. [r=mfinkle]

This commit is contained in:
Sriram Ramasubramanian 2012-05-16 15:28:28 -07:00
Родитель 75c817f0bf
Коммит 879aeadf00
1 изменённых файлов: 15 добавлений и 0 удалений

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

@ -1525,6 +1525,14 @@ abstract public class GeckoApp
mAppContext = this;
// Check to see if the activity is restarted after configuration change.
if (getLastNonConfigurationInstance() != null) {
// Restart the application as a safe way to handle the configuration change.
doRestart();
System.exit(0);
return;
}
// StrictMode is set by defaults resource flag |enableStrictMode|.
if (getResources().getBoolean(R.bool.enableStrictMode)) {
enableStrictMode();
@ -2137,6 +2145,13 @@ abstract public class GeckoApp
GeckoScreenOrientationListener.getInstance().start();
}
@Override
public Object onRetainNonConfigurationInstance() {
// Send a non-null value so that we can restart the application,
// when activity restarts due to configuration change.
return new Boolean(true);
}
abstract public String getPackageName();
abstract public String getContentProcessName();