Revert "Removed PGP sign key shortcut"

This reverts commit 3e5bcf8305.
This commit is contained in:
M66B 2021-09-02 14:16:55 +02:00
parent 07cc57af87
commit dea9741aa5
1 changed files with 13 additions and 5 deletions

View File

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