diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-03-18 16:30:42 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-03-18 16:30:42 +0100 |
commit | fe3d6bafc3de784a17b552575dcf8811621bfb89 (patch) | |
tree | 2b4a0f6fdfc2dc5f57a237bf6e25d0cee3e24f71 | |
parent | eebf1c171a0ba70a92d76f5affb93476f6813e30 (diff) | |
parent | f34b3ee5316b95bbef9c9ac30b753d1708c4dbc4 (diff) | |
download | open-keychain-fe3d6bafc3de784a17b552575dcf8811621bfb89.tar.gz open-keychain-fe3d6bafc3de784a17b552575dcf8811621bfb89.tar.bz2 open-keychain-fe3d6bafc3de784a17b552575dcf8811621bfb89.zip |
Merge pull request #435 from sreeram-boyapati/change_passphrase
Button Text changes to Change Passphrase if Passphrase is set
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java | 8 |
1 files changed, 5 insertions, 3 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 7edb61b09..31804719f 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 @@ -370,9 +370,8 @@ public class EditKeyActivity extends ActionBarActivity { } mCurrentPassphrase = ""; - - buildLayout(); mIsPassPhraseSet = PassphraseCacheService.hasPassphrase(this, masterKeyId); + buildLayout(); if (!mIsPassPhraseSet) { // check "no passphrase" checkbox and remove button mNoPassphrase.setChecked(true); @@ -427,11 +426,14 @@ public class EditKeyActivity extends ActionBarActivity { // find views mChangePassphrase = (BootstrapButton) findViewById(R.id.edit_key_btn_change_passphrase); mNoPassphrase = (CheckBox) findViewById(R.id.edit_key_no_passphrase); - // Build layout based on given userIds and keys + LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); LinearLayout container = (LinearLayout) findViewById(R.id.edit_key_container); + if(mIsPassPhraseSet){ + mChangePassphrase.setText(getString(R.string.btn_change_passphrase)); + } mUserIdsView = (SectionView) inflater.inflate(R.layout.edit_key_section, container, false); mUserIdsView.setType(Id.type.user_id); mUserIdsView.setCanEdit(mMasterCanSign); |