diff options
author | Axesh R. Ajmera <aajmera@codeaurora.org> | 2015-04-23 13:21:56 -0700 |
---|---|---|
committer | WebTech Code Review <code-review@localhost> | 2015-04-27 16:28:19 -0700 |
commit | 3255876883b08a1704198254b493acd15b89d494 (patch) | |
tree | a5b0ad3f6280757b97536c0cabf267f74072c7b5 /src/com/android/browser/Controller.java | |
parent | 2bee19062523ba201f293122924c2d2f61dcd6c4 (diff) | |
download | android_packages_apps_Gello-3255876883b08a1704198254b493acd15b89d494.tar.gz android_packages_apps_Gello-3255876883b08a1704198254b493acd15b89d494.tar.bz2 android_packages_apps_Gello-3255876883b08a1704198254b493acd15b89d494.zip |
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.
Diffstat (limited to 'src/com/android/browser/Controller.java')
-rw-r--r-- | src/com/android/browser/Controller.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 1138700e..f6e8cbfe 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -2370,6 +2370,7 @@ public class Controller } private void showExitDialog(final Activity activity) { + BrowserActivity.killOnExitDialog = false; new AlertDialog.Builder(activity) .setTitle(R.string.exit_browser_title) /* disabled, was worrying people: .setIcon(android.R.drawable.ic_dialog_alert) */ @@ -2382,15 +2383,9 @@ public class Controller }) .setPositiveButton(R.string.exit_quit, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { + mCrashRecoveryHandler.clearState(true); + BrowserActivity.killOnExitDialog = true; activity.finish(); - mHandler.postDelayed(new Runnable() { - @Override - public void run() { - mCrashRecoveryHandler.clearState(true); - int pid = android.os.Process.myPid(); - android.os.Process.killProcess(pid); - } - }, 300); dialog.dismiss(); } }) |