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

Commit 6a19eb3d authored by Vincent Breitmoser's avatar Vincent Breitmoser
Browse files

convert ComposeCryptoStatus to kotlin

parent e1015d32
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ import java.io.InputStream;

import android.app.PendingIntent;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.VisibleForTesting;
import android.support.annotation.WorkerThread;
@@ -51,7 +52,7 @@ public class AutocryptStatusInteractor {
        }
    }

    @Nullable
    @NonNull
    private RecipientAutocryptStatusType getRecipientAutocryptStatusFromIntent(Intent result) {
        boolean allKeysConfirmed = result.getBooleanExtra(OpenPgpApi.RESULT_KEYS_CONFIRMED, false);
        int autocryptStatus =
+7 −7
Original line number Diff line number Diff line
package com.fsck.k9.message

interface CryptoStatus {
    fun getOpenPgpKeyId(): Long?
    val openPgpKeyId: Long?
    fun isProviderStateOk(): Boolean
    fun isSenderPreferEncryptMutual(): Boolean
    val isSenderPreferEncryptMutual: Boolean
    val isEncryptionEnabled: Boolean
    val isPgpInlineModeEnabled: Boolean
    val isSignOnly: Boolean
    fun isSigningEnabled(): Boolean
    fun isEncryptionEnabled(): Boolean
    fun isPgpInlineModeEnabled(): Boolean
    fun isSignOnly(): Boolean
    fun isUserChoice(): Boolean
    fun isReplyToEncrypted(): Boolean
    val isReplyToEncrypted: Boolean
    fun hasRecipients(): Boolean
    fun isEncryptSubject(): Boolean
    val isEncryptSubject: Boolean
    fun getRecipientAddresses(): Array<String>
}
+0 −623

File deleted.

Preview size limit exceeded, changes collapsed.

+672 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -665,7 +665,8 @@ public class MessageCompose extends K9Activity implements OnClickListener,
            return null;
        }

        if (cryptoStatus.shouldUsePgpMessageBuilder()) {
        boolean shouldUsePgpMessageBuilder = cryptoStatus.isOpenPgpConfigured();
        if (shouldUsePgpMessageBuilder) {
            SendErrorState maybeSendErrorState = cryptoStatus.getSendErrorStateOrNull();
            if (maybeSendErrorState != null) {
                recipientPresenter.showPgpSendError(maybeSendErrorState);
Loading