am dee4e253
: Do not trust server-provided content type for attachments
Merge commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c' into eclair-mr2 * commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c': Do not trust server-provided content type for attachments
This commit is contained in:
commit
e3e02adac6
@ -305,7 +305,6 @@ public class EasSyncService extends AbstractSyncService {
|
|||||||
if (status == HttpStatus.SC_OK) {
|
if (status == HttpStatus.SC_OK) {
|
||||||
HttpEntity e = res.getEntity();
|
HttpEntity e = res.getEntity();
|
||||||
int len = (int)e.getContentLength();
|
int len = (int)e.getContentLength();
|
||||||
String type = e.getContentType().getValue();
|
|
||||||
InputStream is = res.getEntity().getContent();
|
InputStream is = res.getEntity().getContent();
|
||||||
File f = (req.destination != null)
|
File f = (req.destination != null)
|
||||||
? new File(req.destination)
|
? new File(req.destination)
|
||||||
@ -344,7 +343,6 @@ public class EasSyncService extends AbstractSyncService {
|
|||||||
: "file://" + f.getAbsolutePath();
|
: "file://" + f.getAbsolutePath();
|
||||||
ContentValues cv = new ContentValues();
|
ContentValues cv = new ContentValues();
|
||||||
cv.put(AttachmentColumns.CONTENT_URI, contentUriString);
|
cv.put(AttachmentColumns.CONTENT_URI, contentUriString);
|
||||||
cv.put(AttachmentColumns.MIME_TYPE, type);
|
|
||||||
att.update(mContext, cv);
|
att.update(mContext, cv);
|
||||||
doStatusCallback(msg.mId, att.mId, EmailServiceStatus.SUCCESS);
|
doStatusCallback(msg.mId, att.mId, EmailServiceStatus.SUCCESS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user