use of com.fsck.k9.message.MessageBuilder.Callback in project k-9 by k9mail.
the class MessageBuilderTest method build_withAttachment_longFileName.
@Test
public void build_withAttachment_longFileName() throws Exception {
MessageBuilder messageBuilder = createSimpleMessageBuilder();
Attachment attachment = createAttachmentWithContent("text/plain", "~~~~~~~~~1~~~~~~~~~2~~~~~~~~~3~~~~~~~~~4~~~~~~~~~5~~~~~~~~~6~~~~~~~~~7.txt", TEST_ATTACHMENT_TEXT);
messageBuilder.setAttachments(Collections.singletonList(attachment));
messageBuilder.buildAsync(callback);
MimeMessage message = getMessageFromCallback();
assertEquals(MESSAGE_HEADERS + MESSAGE_CONTENT_WITH_LONG_FILE_NAME, getMessageContents(message));
}
use of com.fsck.k9.message.MessageBuilder.Callback in project k-9 by k9mail.
the class MessageCryptoHelper method asyncStartOrResumeProcessingMessage.
public void asyncStartOrResumeProcessingMessage(Message message, MessageCryptoCallback callback, OpenPgpDecryptionResult cachedDecryptionResult, boolean processSignedOnly) {
if (this.currentMessage != null) {
reattachCallback(message, callback);
return;
}
this.messageAnnotations = new MessageCryptoAnnotations();
this.state = State.START;
this.currentMessage = message;
this.cachedDecryptionResult = cachedDecryptionResult;
this.callback = callback;
this.processSignedOnly = processSignedOnly;
nextStep();
}
Aggregations