Check for no PGP sign key selected

This commit is contained in:
M66B 2020-02-23 08:58:15 +01:00
parent 58b8a9e8e3
commit f03a7d0335
2 changed files with 3 additions and 0 deletions

View File

@ -1927,6 +1927,8 @@ public class FragmentCompose extends FragmentBase {
}
} else if (OpenPgpApi.ACTION_GET_SIGN_KEY_ID.equals(data.getAction())) {
pgpSignKeyId = result.getLongExtra(OpenPgpApi.EXTRA_SIGN_KEY_ID, -1);
if (pgpSignKeyId == 0)
throw new IllegalArgumentException(context.getString(R.string.title_no_sign_key));
db.identity().setIdentitySignKey(identity.id, pgpSignKeyId);
// Get public key

View File

@ -814,6 +814,7 @@
<string name="title_user_interaction">Transferring to OpenKeychain</string>
<string name="title_signed_data">Verify the signature to show the message text</string>
<string name="title_not_encrypted">Message is not signed or encrypted</string>
<string name="title_no_sign_key">No sign key selected</string>
<string name="title_reset_sign_key">Reset sign key</string>
<string name="title_signature_none">Message not signed</string>