diff options
author | Hung-ying Tyan <tyanh@google.com> | 2009-07-11 22:28:00 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2009-07-13 12:14:32 +0800 |
commit | 1ddccd07f744344b5248dd5418ee526f26d520dc (patch) | |
tree | 9f7cfa50d2a39278e6d33930c75e2963b601966f /src/com/android/settings/SecuritySettings.java | |
parent | a5cead2cf7350e299d92112d513a1d4770d7b31b (diff) | |
download | packages_apps_Settings-1ddccd07f744344b5248dd5418ee526f26d520dc.tar.gz packages_apps_Settings-1ddccd07f744344b5248dd5418ee526f26d520dc.tar.bz2 packages_apps_Settings-1ddccd07f744344b5248dd5418ee526f26d520dc.zip |
Fix dialog handling.
* Changes
+ VpnSettings:
+ Add reconnect dialog to showDialog() framework for handling screen
rotation.
+ Dismiss other alert dialogs in onDestroy()
+ Remove onPrepareDialog() from VpnSettings.
+ Remove updateConnectDialog() from VpnProfileActor.
+ Add authentication error dialog.
+ Add unknown server dialog.
+ SecuritySettings:
+ Make cstor dialogs cancelable.
+ Add cancelable listener.
Patch Set 6:
+ VpnSettings:
+ Disable preferences when connecting/disconnecting.
+ Fix state broadcast when binding a VpnService goes wrong.
Diffstat (limited to 'src/com/android/settings/SecuritySettings.java')
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index 79a394800..b34e8b1d1 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -442,8 +442,9 @@ public class SecuritySettings extends PreferenceActivity implements } } - private class CstorHelper implements - DialogInterface.OnClickListener, DialogInterface.OnDismissListener { + private class CstorHelper implements DialogInterface.OnClickListener, + DialogInterface.OnDismissListener, + DialogInterface.OnCancelListener { private Keystore mKeystore = Keystore.getInstance(); private View mView; private int mDialogId; @@ -523,14 +524,18 @@ public class SecuritySettings extends PreferenceActivity implements .show(); } + public void onCancel(DialogInterface dialog) { + if (mCstorAddCredentialHelper != null) { + // release the object here so that it doesn't get triggerred in + // onDismiss() + mCstorAddCredentialHelper = null; + finish(); + } + } + public void onClick(DialogInterface dialog, int which) { if (which == DialogInterface.BUTTON_NEGATIVE) { - if (mCstorAddCredentialHelper != null) { - // release the object here so that it doesn't get triggerred in - // onDismiss() - mCstorAddCredentialHelper = null; - finish(); - } + onCancel(dialog); return; } @@ -797,7 +802,7 @@ public class SecuritySettings extends PreferenceActivity implements .setTitle(R.string.cstor_access_dialog_title) .setPositiveButton(android.R.string.ok, this) .setNegativeButton(android.R.string.cancel, this) - .setCancelable(false) + .setOnCancelListener(this) .create(); d.setOnDismissListener(this); return d; @@ -837,7 +842,7 @@ public class SecuritySettings extends PreferenceActivity implements .setTitle(R.string.cstor_set_passwd_dialog_title) .setPositiveButton(android.R.string.ok, this) .setNegativeButton(android.R.string.cancel, this) - .setCancelable(false) + .setOnCancelListener(this) .create(); d.setOnDismissListener(this); return d; @@ -872,7 +877,7 @@ public class SecuritySettings extends PreferenceActivity implements .setTitle(R.string.cstor_name_credential_dialog_title) .setPositiveButton(android.R.string.ok, this) .setNegativeButton(android.R.string.cancel, this) - .setCancelable(false) + .setOnCancelListener(this) .create(); d.setOnDismissListener(this); return d; |