1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

When some message has an Application/octet-stream .jpg attachment, be a

bit more lenient and treat it as application/octet-stream, so we can
look up the content type by file extension
This commit is contained in:
Jesse Vincent 2011-02-07 20:34:08 -05:00
parent bb1e66c70d
commit 7cd99bdfd2
2 changed files with 2 additions and 2 deletions

View File

@ -1007,7 +1007,7 @@ public class LocalStore extends Store implements Serializable {
String name = cursor.getString(1); String name = cursor.getString(1);
cursor.close(); cursor.close();
if (MimeUtility.DEFAULT_ATTACHMENT_MIME_TYPE.equals(type)) { if (MimeUtility.DEFAULT_ATTACHMENT_MIME_TYPE.equalsIgnoreCase(type)) {
type = MimeUtility.getMimeTypeByExtension(name); type = MimeUtility.getMimeTypeByExtension(name);
} }
return type; return type;

View File

@ -79,7 +79,7 @@ public class AttachmentView extends FrameLayout {
size = Integer.parseInt(MimeUtility.getHeaderParameter(contentDisposition, "size")); size = Integer.parseInt(MimeUtility.getHeaderParameter(contentDisposition, "size"));
contentType = part.getMimeType(); contentType = part.getMimeType();
if (MimeUtility.DEFAULT_ATTACHMENT_MIME_TYPE.equals(contentType)) { if (MimeUtility.DEFAULT_ATTACHMENT_MIME_TYPE.equalsIgnoreCase(contentType)) {
contentType = MimeUtility.getMimeTypeByExtension(name); contentType = MimeUtility.getMimeTypeByExtension(name);
} }
TextView attachmentName = (TextView) findViewById(R.id.attachment_name); TextView attachmentName = (TextView) findViewById(R.id.attachment_name);