From ea2edb637036a7368b6ef82a0aafdb1a790e26e9 Mon Sep 17 00:00:00 2001 From: Mark Wei Date: Thu, 21 Feb 2013 18:10:10 -0800 Subject: [PATCH] Set MIME type correctly on drafts when content provider does not provide it. Bug: 8235172 Change-Id: Ia8bc575fb902de882dfbba3bfc7cd3acb625ce2c --- src/com/android/email/provider/EmailProvider.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index 4a0d15768..c9c67d3d1 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -343,7 +343,7 @@ public class EmailProvider extends ContentProvider { // For undo handling private int mLastSequence = -1; - private ArrayList mLastSequenceOps = + private final ArrayList mLastSequenceOps = new ArrayList(); // Query parameter indicating the command came from UIProvider @@ -2513,8 +2513,8 @@ outer: } com.android.mail.providers.Attachment uiAtt = new com.android.mail.providers.Attachment(); - uiAtt.name = att.mFileName; - uiAtt.contentType = att.mMimeType; + uiAtt.setName(att.mFileName); + uiAtt.setContentType(att.mMimeType); uiAtt.size = (int) att.mSize; uiAtt.uri = uiUri("uiattachment", att.mId); uiAtts.add(uiAtt); @@ -3512,8 +3512,8 @@ outer: com.android.mail.providers.Attachment uiAtt) { Attachment att = new Attachment(); att.setContentUri(uiAtt.contentUri.toString()); - att.mFileName = uiAtt.name; - att.mMimeType = uiAtt.contentType; + att.mFileName = uiAtt.getName(); + att.mMimeType = uiAtt.getContentType(); att.mSize = uiAtt.size; return att; } @@ -4489,7 +4489,7 @@ outer: } private int[] mSavedWidgetIds = new int[0]; - private ArrayList mWidgetNotifyMailboxes = new ArrayList(); + private final ArrayList mWidgetNotifyMailboxes = new ArrayList(); private AppWidgetManager mAppWidgetManager; private ComponentName mEmailComponent;