am 5c93d366: Merge "Fix NPE in uiSaveDraftMessage" into ub-mail-master

* commit '5c93d3661603843d6bc0b9084a2633c7e3d08ab9':
  Fix NPE in uiSaveDraftMessage
This commit is contained in:
Jay Shrauner 2014-07-16 19:18:00 +00:00 committed by Android Git Automerger
commit fc1eecd7a8

View File

@ -4887,11 +4887,12 @@ public class EmailProvider extends ContentProvider
final Mailbox mailbox =
getMailboxByAccountIdAndType(accountId, Mailbox.TYPE_DRAFTS);
if (mailbox == null) return null;
final Message msg;
Message msg = null;
if (extras.containsKey(BaseColumns._ID)) {
final long messageId = extras.getLong(BaseColumns._ID);
msg = Message.restoreMessageWithId(getContext(), messageId);
} else {
}
if (msg == null) {
msg = new Message();
}
return uiSaveMessage(msg, mailbox, extras);