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

Commit 4c295e2f authored by Vincent Breitmoser's avatar Vincent Breitmoser
Browse files

use @JvmStatic instead of Companion reference, code style

parent 825f06b1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ data class AutocryptDraftStateHeader(val isEncrypt: Boolean,

        const val VALUE_YES = "yes";

        @JvmStatic
        fun fromCryptoStatus(cryptoStatus: CryptoStatus): AutocryptDraftStateHeader {
            if (cryptoStatus.isSignOnly) {
                return AutocryptDraftStateHeader(false, true, cryptoStatus.isReplyToEncrypted,
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ public class PgpMessageBuilder extends MessageBuilder {

    private void addDraftStateHeader() {
        AutocryptDraftStateHeader autocryptDraftStateHeader =
                AutocryptDraftStateHeader.Companion.fromCryptoStatus(cryptoStatus);
                AutocryptDraftStateHeader.fromCryptoStatus(cryptoStatus);
        currentProcessedMimeMessage.setHeader(AutocryptDraftStateHeader.AUTOCRYPT_DRAFT_STATE_HEADER,
                autocryptDraftStateHeader.toHeaderValue());
    }
+13 −11
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@ import org.openintents.openpgp.OpenPgpApiManager.OpenPgpProviderState
 * during email composition to apply cryptographic operations before sending
 * or saving as draft.
 */
data class ComposeCryptoStatus(private val openPgpProviderState: OpenPgpProviderState,
data class ComposeCryptoStatus(
        private val openPgpProviderState: OpenPgpProviderState,
        override val openPgpKeyId: Long?,
        val recipientAddresses: List<String>,
        override val isPgpInlineModeEnabled: Boolean,
@@ -24,7 +25,8 @@ data class ComposeCryptoStatus(private val openPgpProviderState: OpenPgpProvider
        override val isEncryptAllDrafts: Boolean,
        override val isEncryptSubject: Boolean,
        private val cryptoMode: CryptoMode,
                               private val recipientAutocryptStatus: RecipientAutocryptStatus? = null) : CryptoStatus {
        private val recipientAutocryptStatus: RecipientAutocryptStatus? = null
) : CryptoStatus {

    constructor(openPgpProviderState: OpenPgpProviderState,
                openPgpKeyId: Long?,