aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/util
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-12-27 20:52:52 +0100
committerChristian Schneppe <christian@pix-art.de>2018-12-27 20:52:52 +0100
commit815421f92acf7fce4664fcda196a31c515379204 (patch)
tree3bbb142eb0657679d9b63ec1403feb6c91687434 /src/main/java/de/pixart/messenger/ui/util
parent55058cca9d8ed5343bc4398fe0ea87633d8a485d (diff)
added epub and azw mime types. try to resolve application/octet-stream by file extension instead. added preview icons for ebooks
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/util')
-rw-r--r--src/main/java/de/pixart/messenger/ui/util/Attachment.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/util/Attachment.java b/src/main/java/de/pixart/messenger/ui/util/Attachment.java
index 96159c1bd..b63510209 100644
--- a/src/main/java/de/pixart/messenger/ui/util/Attachment.java
+++ b/src/main/java/de/pixart/messenger/ui/util/Attachment.java
@@ -115,13 +115,13 @@ public class Attachment implements Parcelable {
for (int i = 0; i < clipData.getItemCount(); ++i) {
final Uri uri = clipData.getItemAt(i).getUri();
Log.d(Config.LOGTAG, "uri=" + uri + " contentType=" + contentType);
- final String mime = contentType != null ? contentType : MimeUtils.guessMimeTypeFromUri(context, uri);
+ final String mime = MimeUtils.guessMimeTypeFromUriAndMime(context, uri, contentType);
Log.d(Config.LOGTAG, "mime=" + mime);
uris.add(new Attachment(uri, type, mime));
}
}
} else {
- final String mime = contentType != null ? contentType : MimeUtils.guessMimeTypeFromUri(context, data);
+ final String mime = MimeUtils.guessMimeTypeFromUriAndMime(context, data, contentType);
uris.add(new Attachment(data, type, mime));
}
return uris;