mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 11:35:07 -05:00
fix nullpointer in EditKeyActivity
This commit is contained in:
parent
7b9b3d07bb
commit
bc0edfda0b
@ -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>
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user