Fix for activity lifecycle in exit dialog.
The activity lifecycle was impacted because of
the way, process was getting killed in Exit dialog
This change fixes it.
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index c0a91ad..531a1c7 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -65,6 +65,8 @@
private Handler mHandler = new Handler();
private final Locale mCurrentLocale = Locale.getDefault();
+ public static boolean killOnExitDialog = false;
+
private UiController mUiController;
private Handler mHandlerEx = new Handler();
@@ -304,8 +306,8 @@
mEngineInitializer.onActivityDestroy();
mController.onDestroy();
mController = NullController.INSTANCE;
- if (!Locale.getDefault().equals(mCurrentLocale)) {
- Log.e(LOGTAG,"Force Killing Browser on locale change");
+ if (!Locale.getDefault().equals(mCurrentLocale) || killOnExitDialog) {
+ Log.i(LOGTAG,"Force Killing Browser");
Process.killProcess(Process.myPid());
}