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

Simplification

This commit is contained in:
M66B 2019-12-31 10:28:28 +01:00
parent 9f1fe2784c
commit 2034cafa6b

View file

@ -1350,16 +1350,16 @@ public class FragmentCompose extends FragmentBase {
} }
Intent intent; Intent intent;
if (EntityMessage.PGP_SIGNONLY.equals(draft.encrypt)) { if (EntityMessage.PGP_SIGNONLY.equals(draft.encrypt))
intent = new Intent(OpenPgpApi.ACTION_GET_SIGN_KEY_ID); intent = new Intent(OpenPgpApi.ACTION_GET_SIGN_KEY_ID);
intent.putExtra(BuildConfig.APPLICATION_ID, working); else if (EntityMessage.PGP_SIGNENCRYPT.equals(draft.encrypt)) {
} else if (EntityMessage.PGP_SIGNENCRYPT.equals(draft.encrypt)) {
intent = new Intent(OpenPgpApi.ACTION_GET_KEY_IDS); intent = new Intent(OpenPgpApi.ACTION_GET_KEY_IDS);
intent.putExtra(OpenPgpApi.EXTRA_USER_IDS, pgpUserIds); intent.putExtra(OpenPgpApi.EXTRA_USER_IDS, pgpUserIds);
intent.putExtra(BuildConfig.APPLICATION_ID, working);
} else } else
throw new IllegalArgumentException("Invalid encrypt=" + draft.encrypt); throw new IllegalArgumentException("Invalid encrypt=" + draft.encrypt);
intent.putExtra(BuildConfig.APPLICATION_ID, working);
onPgp(intent); onPgp(intent);
} catch (Throwable ex) { } catch (Throwable ex) {
if (ex instanceof IllegalArgumentException) if (ex instanceof IllegalArgumentException)
@ -1800,7 +1800,6 @@ public class FragmentCompose extends FragmentBase {
} else { } else {
// Get sign key // Get sign key
Intent intent = new Intent(OpenPgpApi.ACTION_GET_SIGN_KEY_ID); Intent intent = new Intent(OpenPgpApi.ACTION_GET_SIGN_KEY_ID);
intent.putExtra(OpenPgpApi.EXTRA_USER_IDS, pgpUserIds);
intent.putExtra(BuildConfig.APPLICATION_ID, draft.id); intent.putExtra(BuildConfig.APPLICATION_ID, draft.id);
return intent; return intent;
} }