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.
This commit is contained in:
Hung-ying Tyan
2009-07-09 11:45:02 +08:00
parent 7063f37102
commit 66959341a6

View File

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