fix nullpointer in EditKeyActivity

This commit is contained in:
Dominik Schürmann 2014-01-02 22:45:24 +01:00
parent 7b9b3d07bb
commit bc0edfda0b
2 changed files with 13 additions and 13 deletions

View File

@ -19,8 +19,8 @@
<resources> <resources>
<!-- title --> <!-- title -->
<string name="title_manage_public_keys">Manage Public Keys</string> <string name="title_manage_public_keys">Public Keys</string>
<string name="title_manage_secret_keys">Manage Secret Keys</string> <string name="title_manage_secret_keys">Secret Keys</string>
<string name="title_select_recipients">Select Public Key</string> <string name="title_select_recipients">Select Public Key</string>
<string name="title_select_secret_key">Select Secret Key</string> <string name="title_select_secret_key">Select Secret Key</string>
<string name="title_encrypt">Encrypt</string> <string name="title_encrypt">Encrypt</string>

View File

@ -295,17 +295,6 @@ public class EditKeyActivity extends SherlockFragmentActivity {
} }
private void finallyEdit(final long masterKeyId, final boolean masterCanSign) { 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) { if (masterKeyId != 0) {
PGPSecretKey masterKey = null; PGPSecretKey masterKey = null;
mKeyRing = ProviderHelper.getPGPSecretKeyRingByMasterKeyId(this, masterKeyId); mKeyRing = ProviderHelper.getPGPSecretKeyRingByMasterKeyId(this, masterKeyId);
@ -328,6 +317,17 @@ public class EditKeyActivity extends SherlockFragmentActivity {
} }
buildLayout(); buildLayout();
// TODO: ???
if (mCurrentPassPhrase == null) {
mCurrentPassPhrase = "";
}
if (mCurrentPassPhrase.equals("")) {
// check "no passphrase" checkbox and remove button
mNoPassphrase.setChecked(true);
mChangePassPhrase.setVisibility(View.GONE);
}
} }
/** /**