am e3e02ada: am dee4e253: Do not trust server-provided content type for attachments

Merge commit 'e3e02adac681790ff4bea653e273f7e2b0eea35b' into eclair-mr2-plus-aosp

* commit 'e3e02adac681790ff4bea653e273f7e2b0eea35b':
  Do not trust server-provided content type for attachments
This commit is contained in:
Andrew Stadler 2009-10-14 07:46:46 -07:00 committed by Android Git Automerger
commit 77c7ce54be

View File

@ -305,7 +305,6 @@ public class EasSyncService extends AbstractSyncService {
if (status == HttpStatus.SC_OK) {
HttpEntity e = res.getEntity();
int len = (int)e.getContentLength();
String type = e.getContentType().getValue();
InputStream is = res.getEntity().getContent();
File f = (req.destination != null)
? new File(req.destination)
@ -344,7 +343,6 @@ public class EasSyncService extends AbstractSyncService {
: "file://" + f.getAbsolutePath();
ContentValues cv = new ContentValues();
cv.put(AttachmentColumns.CONTENT_URI, contentUriString);
cv.put(AttachmentColumns.MIME_TYPE, type);
att.update(mContext, cv);
doStatusCallback(msg.mId, att.mId, EmailServiceStatus.SUCCESS);
}