From 0b8036fbefd5b47363cd9fe6f0391c3e217417d3 Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Sun, 2 Feb 2014 00:51:56 +0000 Subject: [PATCH] allow passphrases to be removed --- .../org/sufficientlysecure/keychain/ui/EditKeyActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java index e7b1b4c23..ac14427f8 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java @@ -94,6 +94,7 @@ public class EditKeyActivity extends SherlockFragmentActivity { private String mCurrentPassPhrase = null; private String mNewPassPhrase = null; + private String mSavedNewPassPhrase = null; private BootstrapButton mChangePassPhrase; @@ -462,10 +463,11 @@ public class EditKeyActivity extends SherlockFragmentActivity { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked) { // remove passphrase - mNewPassPhrase = null; - + mSavedNewPassPhrase = mNewPassPhrase; + mNewPassPhrase = ""; mChangePassPhrase.setVisibility(View.GONE); } else { + mNewPassPhrase = mSavedNewPassPhrase; mChangePassPhrase.setVisibility(View.VISIBLE); } }