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.
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 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;
}