From 0b3165d365baa066465f5ae95d93feeec75a0ef3 Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 22 Jun 2011 10:44:33 -0700 Subject: Handle restore dialog cancel Bug: 4860016 Change-Id: I77a61e4bdbdb54a8840b2f5f1e8e20a1b05cb3e2 --- src/com/android/browser/CrashRecoveryHandler.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/com/android') diff --git a/src/com/android/browser/CrashRecoveryHandler.java b/src/com/android/browser/CrashRecoveryHandler.java index acc2a30..6d8d921 100644 --- a/src/com/android/browser/CrashRecoveryHandler.java +++ b/src/com/android/browser/CrashRecoveryHandler.java @@ -19,6 +19,7 @@ package com.android.browser; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; +import android.content.DialogInterface.OnCancelListener; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.os.Bundle; @@ -141,6 +142,12 @@ public class CrashRecoveryHandler { .setNegativeButton(R.string.recover_no, new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { + dialog.cancel(); + } + }) + .setOnCancelListener(new OnCancelListener() { + @Override + public void onCancel(DialogInterface dialog) { clearState(mController.getActivity()); mController.doStart(null, intent); } -- cgit v1.1