mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Don't attempt to verify/decrypt if no crypto provider is configured
This commit is contained in:
parent
b515e947cf
commit
26eb1f52e5
@ -17,6 +17,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender.SendIntentException;
|
||||
import android.os.AsyncTask;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.fsck.k9.Account;
|
||||
@ -73,6 +74,11 @@ public class MessageCryptoHelper {
|
||||
public void decryptOrVerifyMessagePartsIfNecessary(LocalMessage message) {
|
||||
this.message = message;
|
||||
|
||||
if (!isCryptoProviderConfigured()) {
|
||||
returnResultToFragment();
|
||||
return;
|
||||
}
|
||||
|
||||
List<Part> encryptedParts = MessageDecryptVerifier.findEncryptedParts(message);
|
||||
List<Part> signedParts = MessageDecryptVerifier.findSignedParts(message);
|
||||
List<Part> inlineParts = MessageDecryptVerifier.findPgpInlineParts(message);
|
||||
@ -87,6 +93,10 @@ public class MessageCryptoHelper {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isCryptoProviderConfigured() {
|
||||
return !TextUtils.isEmpty(account.getCryptoApp());
|
||||
}
|
||||
|
||||
private void decryptOrVerifyNextPartOrStartExtractingTextAndAttachments() {
|
||||
if (!partsToDecryptOrVerify.isEmpty()) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user