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