diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/MimeUtils.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/MimeUtils.java b/src/main/java/de/pixart/messenger/utils/MimeUtils.java index bdcd82bae..0e52e283f 100644 --- a/src/main/java/de/pixart/messenger/utils/MimeUtils.java +++ b/src/main/java/de/pixart/messenger/utils/MimeUtils.java @@ -505,7 +505,12 @@ public final class MimeUtils { public static String guessMimeTypeFromUri(Context context, Uri uri) { // try the content resolver - String mimeType = context.getContentResolver().getType(uri); + String mimeType; + try { + mimeType = context.getContentResolver().getType(uri); + } catch (Throwable throwable) { + mimeType = null; + } // try the extension if (mimeType == null && uri.getPath() != null) { String path = uri.getPath(); |