mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -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:
parent
bb1e66c70d
commit
7cd99bdfd2
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user