Search in sources :

Example 1 with ComposeCryptoStatusBuilder

use of com.fsck.k9.activity.compose.ComposeCryptoStatus.ComposeCryptoStatusBuilder in project k-9 by k9mail.

the class RecipientPresenter method getCurrentCryptoStatus.

public ComposeCryptoStatus getCurrentCryptoStatus() {
    if (cachedCryptoStatus == null) {
        ComposeCryptoStatusBuilder builder = new ComposeCryptoStatusBuilder().setCryptoProviderState(cryptoProviderState).setCryptoMode(currentCryptoMode).setEnablePgpInline(cryptoEnablePgpInline).setRecipients(getAllRecipients());
        long accountCryptoKey = account.getCryptoKey();
        if (accountCryptoKey != Account.NO_OPENPGP_KEY) {
            // TODO split these into individual settings? maybe after key is bound to identity
            builder.setSigningKeyId(accountCryptoKey);
            builder.setSelfEncryptId(accountCryptoKey);
        }
        cachedCryptoStatus = builder.build();
    }
    return cachedCryptoStatus;
}
Also used : ComposeCryptoStatusBuilder(com.fsck.k9.activity.compose.ComposeCryptoStatus.ComposeCryptoStatusBuilder)

Aggregations

ComposeCryptoStatusBuilder (com.fsck.k9.activity.compose.ComposeCryptoStatus.ComposeCryptoStatusBuilder)1