1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-24 23:12:55 +00:00

Check for OpenKeychain app

This commit is contained in:
M66B 2023-02-09 10:10:19 +01:00
parent 85adebe77d
commit da5bea4569
2 changed files with 17 additions and 0 deletions

View file

@ -1975,6 +1975,22 @@ public class FragmentCompose extends FragmentBase {
private void onMenuEncrypt() {
EntityIdentity identity = (EntityIdentity) spIdentity.getSelectedItem();
if (identity == null || identity.encrypt == 0) {
final Context context = getContext();
if (!Helper.isOpenKeychainInstalled(context)) {
new AlertDialog.Builder(context)
.setTitle(R.string.title_no_openpgp)
.setMessage(R.string.title_no_openpgp_remark)
.setPositiveButton(R.string.title_info, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Helper.viewFAQ(context, 12);
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
return;
}
if (EntityMessage.ENCRYPT_NONE.equals(encrypt) || encrypt == null)
encrypt = EntityMessage.PGP_SIGNENCRYPT;
else if (EntityMessage.PGP_SIGNENCRYPT.equals(encrypt))

View file

@ -1650,6 +1650,7 @@
<string name="title_alternative_text">Load plain text</string>
<string name="title_alternative_html">Load HTML</string>
<string name="title_no_openpgp">OpenKeychain not found</string>
<string name="title_no_openpgp_remark">PGP end-to-end encryption needs to be configured first</string>
<string name="title_user_interaction">Transferring to OpenKeychain</string>
<string name="title_padlock">Use the padlock to decrypt the message</string>
<string name="title_signed_data">Verify the signature to show the message text</string>