Document sign key handling

This commit is contained in:
M66B
2019-07-18 17:45:00 +02:00
parent 99abbb9a1d
commit 00ef5e056a
3 changed files with 8 additions and 2 deletions

View File

@@ -1486,11 +1486,13 @@ public class FragmentCompose extends FragmentBase {
return result.getParcelableExtra(OpenPgpApi.RESULT_INTENT);
case OpenPgpApi.RESULT_CODE_ERROR:
if (identity != null)
db.identity().setIdentitySignKey(identity.id, null);
OpenPgpError error = result.getParcelableExtra(OpenPgpApi.RESULT_ERROR);
if (error == null)
throw new IllegalArgumentException("Unknown error");
else
throw new IllegalArgumentException(error.getMessage());
throw new IllegalArgumentException(error.getMessage() + " (" + error.getErrorId() + ")");
default:
throw new IllegalArgumentException("Unknown result code=" + resultCode);