No PendingIntent for RESULT_NO_SIGNATURE, RESULT_INVALID_SIGNATURE
This commit is contained in:
@@ -539,13 +539,26 @@ public class OpenPgpService extends Service {
|
|||||||
|
|
||||||
result.putExtra(OpenPgpApi.RESULT_SIGNATURE, signatureResult);
|
result.putExtra(OpenPgpApi.RESULT_SIGNATURE, signatureResult);
|
||||||
|
|
||||||
if (signatureResult.getResult() == OpenPgpSignatureResult.RESULT_KEY_MISSING) {
|
switch (signatureResult.getResult()) {
|
||||||
// If signature is unknown we return an _additional_ PendingIntent
|
case OpenPgpSignatureResult.RESULT_KEY_MISSING: {
|
||||||
// to retrieve the missing key
|
// If signature key is missing we return a PendingIntent to retrieve the key
|
||||||
result.putExtra(OpenPgpApi.RESULT_INTENT, getKeyserverPendingIntent(data, signatureResult.getKeyId()));
|
result.putExtra(OpenPgpApi.RESULT_INTENT, getKeyserverPendingIntent(data, signatureResult.getKeyId()));
|
||||||
} else {
|
break;
|
||||||
// If signature key is known, return PendingIntent to show key
|
}
|
||||||
result.putExtra(OpenPgpApi.RESULT_INTENT, getShowKeyPendingIntent(signatureResult.getKeyId()));
|
case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
|
||||||
|
case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
|
||||||
|
case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
|
||||||
|
case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
|
||||||
|
case OpenPgpSignatureResult.RESULT_INVALID_INSECURE: {
|
||||||
|
// If signature key is known, return PendingIntent to show key
|
||||||
|
result.putExtra(OpenPgpApi.RESULT_INTENT, getShowKeyPendingIntent(signatureResult.getKeyId()));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
|
||||||
|
case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE: {
|
||||||
|
// no key id -> no PendingIntent
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) < 5) {
|
if (data.getIntExtra(OpenPgpApi.EXTRA_API_VERSION, -1) < 5) {
|
||||||
|
|||||||
Reference in New Issue
Block a user