From 66959341a6b0891893d4c851be708c3073f61154 Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Thu, 9 Jul 2009 11:45:02 +0800 Subject: Fix behavior of cancelling the name cred. dialog. The code used to trying to store the credential even when the user cancels the dialog. Fixed in this CL. --- src/com/android/settings/SecuritySettings.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/com') diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index 73578c7..79a3948 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -525,7 +525,12 @@ public class SecuritySettings extends PreferenceActivity implements public void onClick(DialogInterface dialog, int which) { if (which == DialogInterface.BUTTON_NEGATIVE) { - if (mCstorAddCredentialHelper != null) finish(); + if (mCstorAddCredentialHelper != null) { + // release the object here so that it doesn't get triggerred in + // onDismiss() + mCstorAddCredentialHelper = null; + finish(); + } return; } -- cgit v1.1