From 0beed82654e59ada74ed411ad94f3421ad7b7406 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 17 Mar 2020 08:04:00 +0100 Subject: [PATCH] Workaround unknown mime types --- app/src/main/java/eu/faircode/email/EntityAttachment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/EntityAttachment.java b/app/src/main/java/eu/faircode/email/EntityAttachment.java index 4810a2a309..327c03223d 100644 --- a/app/src/main/java/eu/faircode/email/EntityAttachment.java +++ b/app/src/main/java/eu/faircode/email/EntityAttachment.java @@ -187,7 +187,8 @@ public class EntityAttachment { if ("text/plain".equals(type) && "ovpn".equals(extension)) return "application/x-openvpn-profile"; - if (TextUtils.isEmpty(type) || type.endsWith("/unknown") || + if (TextUtils.isEmpty(type) || + type.startsWith("unknown/") || type.endsWith("/unknown") || "application/octet-stream".equals(type) || "application/zip".equals(type)) { if ("log".equalsIgnoreCase(extension)) return "text/plain";