Merge pull request #1827 from k9mail/encapsulated-sigkey-intent
Use PendingIntent from encapsulated result if available for showing key info
This commit is contained in:
commit
00e63fc8f1
2 changed files with 12 additions and 1 deletions
|
@ -101,6 +101,17 @@ public final class CryptoResultAnnotation {
|
|||
return openPgpSignatureResult;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public PendingIntent getOpenPgpSigningKeyIntentIfAny() {
|
||||
if (hasSignatureResult()) {
|
||||
return getOpenPgpPendingIntent();
|
||||
}
|
||||
if (encapsulatedResult != null && encapsulatedResult.hasSignatureResult()) {
|
||||
return encapsulatedResult.getOpenPgpPendingIntent();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public PendingIntent getOpenPgpPendingIntent() {
|
||||
return openPgpPendingIntent;
|
||||
|
|
|
@ -188,7 +188,7 @@ public class MessageCryptoPresenter implements OnCryptoClickListener {
|
|||
|
||||
public void onClickShowCryptoKey() {
|
||||
try {
|
||||
PendingIntent pendingIntent = cryptoResultAnnotation.getOpenPgpPendingIntent();
|
||||
PendingIntent pendingIntent = cryptoResultAnnotation.getOpenPgpSigningKeyIntentIfAny();
|
||||
if (pendingIntent != null) {
|
||||
messageCryptoMvpView.startPendingIntentForCryptoPresenter(
|
||||
pendingIntent.getIntentSender(), null, null, 0, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue