am dee4e253
: Do not trust server-provided content type for attachments
Merge commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c' into eclair-plus-aosp * commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c': Do not trust server-provided content type for attachments
This commit is contained in:
commit
185b795d40
@ -299,7 +299,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)
|
||||
@ -338,7 +337,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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user