1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04: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);
cursor.close();
if (MimeUtility.DEFAULT_ATTACHMENT_MIME_TYPE.equals(type)) {
if (MimeUtility.DEFAULT_ATTACHMENT_MIME_TYPE.equalsIgnoreCase(type)) {
type = MimeUtility.getMimeTypeByExtension(name);
}
return type;

View File

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