1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

Short circuit get sign key ID

This commit is contained in:
M66B 2019-12-01 10:14:42 +01:00
parent 06519366e8
commit 2d3e5efcc4

View file

@ -1574,10 +1574,17 @@ public class FragmentCompose extends FragmentBase {
} }
// Call OpenPGP // Call OpenPGP
Log.i("Executing " + data.getAction()); Intent result;
Log.logExtras(data); if (OpenPgpApi.ACTION_GET_SIGN_KEY_ID.equals(data.getAction()) && identity.sign_key != null) {
OpenPgpApi api = new OpenPgpApi(context, pgpService.getService()); result = data;
Intent result = api.executeApi(data, new FileInputStream(input), new FileOutputStream(output)); result.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_SUCCESS);
result.putExtra(OpenPgpApi.EXTRA_SIGN_KEY_ID, identity.sign_key);
} else {
Log.i("Executing " + data.getAction());
Log.logExtras(data);
OpenPgpApi api = new OpenPgpApi(context, pgpService.getService());
result = api.executeApi(data, new FileInputStream(input), new FileOutputStream(output));
}
// Process result // Process result
try { try {