Set MIME type correctly on drafts when content provider does not provide it.

Bug: 8235172
Change-Id: Ia8bc575fb902de882dfbba3bfc7cd3acb625ce2c
This commit is contained in:
Mark Wei 2013-02-21 18:10:10 -08:00
parent d384fcbffa
commit ea2edb6370

View File

@ -343,7 +343,7 @@ public class EmailProvider extends ContentProvider {
// For undo handling
private int mLastSequence = -1;
private ArrayList<ContentProviderOperation> mLastSequenceOps =
private final ArrayList<ContentProviderOperation> mLastSequenceOps =
new ArrayList<ContentProviderOperation>();
// 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<Long> mWidgetNotifyMailboxes = new ArrayList<Long>();
private final ArrayList<Long> mWidgetNotifyMailboxes = new ArrayList<Long>();
private AppWidgetManager mAppWidgetManager;
private ComponentName mEmailComponent;