Search in sources :

Example 76 with MessageReference

use of com.fsck.k9.controller.MessageReference in project k-9 by k9mail.

the class AttachmentPresenter method processMessageToForwardAsAttachment.

public void processMessageToForwardAsAttachment(MessageViewInfo messageViewInfo) throws MessagingException {
    if (messageViewInfo.isMessageIncomplete) {
        attachmentMvpView.showMissingAttachmentsPartialMessageForwardWarning();
    } else {
        LocalMessage localMessage = (LocalMessage) messageViewInfo.message;
        MessageReference messageReference = localMessage.makeMessageReference();
        Uri rawMessageUri = RawMessageProvider.getRawMessageUri(messageReference);
        addInternalAttachment(rawMessageUri, "message/rfc822", true);
    }
}
Also used : LocalMessage(com.fsck.k9.mailstore.LocalMessage) MessageReference(com.fsck.k9.controller.MessageReference) Uri(android.net.Uri)

Aggregations

MessageReference (com.fsck.k9.activity.MessageReference)49 PendingIntent (android.app.PendingIntent)25 Account (com.fsck.k9.Account)22 Test (org.junit.Test)14 LocalMessage (com.fsck.k9.mailstore.LocalMessage)13 MessageReference (com.fsck.k9.controller.MessageReference)12 NotificationCompat (android.support.v4.app.NotificationCompat)9 ArrayList (java.util.ArrayList)9 Notification (android.app.Notification)8 List (java.util.List)7 MessagingException (com.fsck.k9.mail.MessagingException)6 LocalFolder (com.fsck.k9.mailstore.LocalFolder)5 SearchAccount (com.fsck.k9.search.SearchAccount)5 HashMap (java.util.HashMap)5 Cursor (android.database.Cursor)3 Message (com.fsck.k9.mail.Message)3 LinkedList (java.util.LinkedList)3 Map (java.util.Map)3 Intent (android.content.Intent)2 Uri (android.net.Uri)2