Home | History | Annotate | Download | only in email

Lines Matching refs:localMessage

75      * @param localMessage The message we'd like to write into the DB
78 public static boolean updateMessageFields(EmailContent.Message localMessage, Message message,
91 localMessage.mDisplayName = from[0].toFriendly();
94 localMessage.mTimeStamp = sentDate.getTime();
97 localMessage.mTimeStamp = internalDate.getTime();
100 localMessage.mSubject = subject;
102 localMessage.mFlagRead = message.isSet(Flag.SEEN);
104 localMessage.mFlags |= EmailContent.Message.FLAG_REPLIED_TO;
109 if (localMessage.mFlagLoaded != EmailContent.Message.FLAG_LOADED_COMPLETE) {
110 if (localMessage.mDisplayName == null || "".equals(localMessage.mDisplayName)) {
111 localMessage.mFlagLoaded = EmailContent.Message.FLAG_LOADED_UNLOADED;
113 localMessage.mFlagLoaded = EmailContent.Message.FLAG_LOADED_PARTIAL;
116 localMessage.mFlagFavorite = message.isSet(Flag.FLAGGED);
120 localMessage.mServerId = message.getUid();
122 localMessage.mServerTimeStamp = internalDate.getTime();
130 localMessage.mMessageId = messageId;
134 localMessage.mMailboxKey = mailboxId;
135 localMessage.mAccountKey = accountId;
138 localMessage.mFrom = Address.pack(from);
141 localMessage.mTo = Address.pack(to);
142 localMessage.mCc = Address.pack(cc);
143 localMessage.mBcc = Address.pack(bcc);
144 localMessage.mReplyTo = Address.pack(replyTo);
161 * @param localMessage the attachments will be built against this message
165 public static void updateAttachments(Context context, EmailContent.Message localMessage,
167 localMessage.mAttachments = null;
169 addOneAttachment(context, localMessage, attachmentPart);
187 * @param localMessage the attachments will be built against this message
191 public static void addOneAttachment(Context context, EmailContent.Message localMessage,
227 localAttachment.mMessageKey = localMessage.mId;
230 localAttachment.mAccountKey = localMessage.mAccountKey;
241 Uri uri = ContentUris.withAppendedId(Attachment.MESSAGE_ID_URI, localMessage.mId);
273 saveAttachmentBody(context, part, localAttachment, localMessage.mAccountKey);
275 if (localMessage.mAttachments == null) {
276 localMessage.mAttachments = new ArrayList<Attachment>();
278 localMessage.mAttachments.add(localAttachment);
279 localMessage.mFlagAttachment = true;
336 public static Message makeMessage(Context context, EmailContent.Message localMessage)
341 message.setSubject(localMessage.mSubject == null ? "" : localMessage.mSubject);
342 Address[] from = Address.unpack(localMessage.mFrom);
346 message.setSentDate(new Date(localMessage.mTimeStamp));
347 message.setUid(localMessage.mServerId);
349 localMessage.mFlagLoaded == EmailContent.Message.FLAG_LOADED_DELETED);
350 message.setFlag(Flag.SEEN, localMessage.mFlagRead);
351 message.setFlag(Flag.FLAGGED, localMessage.mFlagFavorite);
352 // message.setFlag(Flag.DRAFT, localMessage.mMailboxKey == draftMailboxKey);
353 message.setRecipients(RecipientType.TO, Address.unpack(localMessage.mTo));
354 message.setRecipients(RecipientType.CC, Address.unpack(localMessage.mCc));
355 message.setRecipients(RecipientType.BCC, Address.unpack(localMessage.mBcc));
356 message.setReplyTo(Address.unpack(localMessage.mReplyTo));
357 message.setInternalDate(new Date(localMessage.mServerTimeStamp));
358 message.setMessageId(localMessage.mMessageId);
368 EmailContent.Body.restoreBodyHtmlWithMessageId(context, localMessage.mId));
375 EmailContent.Body.restoreBodyTextWithMessageId(context, localMessage.mId));
380 boolean isReply = (localMessage.mFlags & EmailContent.Message.FLAG_TYPE_REPLY) != 0;
381 boolean isForward = (localMessage.mFlags & EmailContent.Message.FLAG_TYPE_FORWARD) != 0;
389 EmailContent.Body.restoreIntroTextWithMessageId(context, localMessage.mId));
397 EmailContent.Body.restoreReplyHtmlWithMessageId(context, localMessage.mId));
404 EmailContent.Body.restoreReplyTextWithMessageId(context, localMessage.mId));
412 // Uri uri = ContentUris.withAppendedId(Attachment.MESSAGE_ID_URI, localMessage.mId);