diff --git a/src/org/thoughtcrime/securesms/util/MediaUtil.java b/src/org/thoughtcrime/securesms/util/MediaUtil.java index afdb952f01..48cf29cc76 100644 --- a/src/org/thoughtcrime/securesms/util/MediaUtil.java +++ b/src/org/thoughtcrime/securesms/util/MediaUtil.java @@ -69,8 +69,8 @@ public class MediaUtil { public static @Nullable String getMimeType(Context context, Uri uri) { if (uri == null) return null; - if (PersistentBlobProvider.isAuthority(context, uri)) { - return PersistentBlobProvider.getMimeType(context, uri); + if (PartAuthority.isLocalUri(uri)) { + return PartAuthority.getAttachmentContentType(context, uri); } String type = context.getContentResolver().getType(uri); @@ -78,6 +78,7 @@ public class MediaUtil { final String extension = MimeTypeMap.getFileExtensionFromUrl(uri.toString()); type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase()); } + return getCorrectedMimeType(type); }