Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57a5d961 authored by Vincent Breitmoser's avatar Vincent Breitmoser
Browse files

change variable name

parent 0dae7e8f
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -71,14 +71,14 @@ public class MessageViewInfoExtractor {
    }

    @WorkerThread
    public MessageViewInfo extractMessageForView(Message message, @Nullable MessageCryptoAnnotations annotations)
    public MessageViewInfo extractMessageForView(Message message, @Nullable MessageCryptoAnnotations cryptoAnnotations)
            throws MessagingException {
        ArrayList<Part> extraParts = new ArrayList<>();
        Part cryptoContentPart = MessageCryptoStructureDetector.findPrimaryEncryptedOrSignedPart(message, extraParts);

        if (cryptoContentPart == null) {
            if (annotations != null && !annotations.isEmpty()) {
                Timber.e("Got crypto message annotations but no crypto root part!");
            if (cryptoAnnotations != null && !cryptoAnnotations.isEmpty()) {
                Timber.e("Got crypto message cryptoContentAnnotations but no crypto root part!");
            }
            return extractSimpleMessageForView(message, message);
        }
@@ -90,10 +90,12 @@ public class MessageViewInfoExtractor {
        if (!K9.isOpenPgpProviderConfigured() && isOpenPgpEncrypted) {
            CryptoResultAnnotation noProviderAnnotation = CryptoResultAnnotation.createErrorAnnotation(
                    CryptoError.OPENPGP_ENCRYPTED_NO_PROVIDER, null);
            return MessageViewInfo.createWithErrorState(message, false).withCryptoData(noProviderAnnotation, null, null);
            return MessageViewInfo.createWithErrorState(message, false)
                    .withCryptoData(noProviderAnnotation, null, null);
        }

        CryptoResultAnnotation cryptoContentPartAnnotation = annotations != null ? annotations.get(cryptoContentPart) : null;
        CryptoResultAnnotation cryptoContentPartAnnotation =
                cryptoAnnotations != null ? cryptoAnnotations.get(cryptoContentPart) : null;
        if (cryptoContentPartAnnotation != null) {
            return extractCryptoMessageForView(message, extraParts, cryptoContentPart, cryptoContentPartAnnotation);
        }