From bc0edfda0bae21a567b9ea340cab323f9a15a086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Thu, 2 Jan 2014 22:45:24 +0100 Subject: [PATCH] fix nullpointer in EditKeyActivity --- OpenPGP-Keychain/res/values/strings.xml | 4 ++-- .../keychain/ui/EditKeyActivity.java | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/OpenPGP-Keychain/res/values/strings.xml b/OpenPGP-Keychain/res/values/strings.xml index d900f5a71..bfc7434b2 100644 --- a/OpenPGP-Keychain/res/values/strings.xml +++ b/OpenPGP-Keychain/res/values/strings.xml @@ -19,8 +19,8 @@ - Manage Public Keys - Manage Secret Keys + Public Keys + Secret Keys Select Public Key Select Secret Key Encrypt diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java index 7aeb51c8f..4dcaa6d73 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EditKeyActivity.java @@ -295,17 +295,6 @@ public class EditKeyActivity extends SherlockFragmentActivity { } private void finallyEdit(final long masterKeyId, final boolean masterCanSign) { - // TODO: ??? - if (mCurrentPassPhrase == null) { - mCurrentPassPhrase = ""; - } - - if (mCurrentPassPhrase.equals("")) { - // check "no passphrase" checkbox and remove button - mNoPassphrase.setChecked(true); - mChangePassPhrase.setVisibility(View.GONE); - } - if (masterKeyId != 0) { PGPSecretKey masterKey = null; mKeyRing = ProviderHelper.getPGPSecretKeyRingByMasterKeyId(this, masterKeyId); @@ -328,6 +317,17 @@ public class EditKeyActivity extends SherlockFragmentActivity { } buildLayout(); + + // TODO: ??? + if (mCurrentPassPhrase == null) { + mCurrentPassPhrase = ""; + } + + if (mCurrentPassPhrase.equals("")) { + // check "no passphrase" checkbox and remove button + mNoPassphrase.setChecked(true); + mChangePassPhrase.setVisibility(View.GONE); + } } /**