diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 674e327cfd..2ad39a921f 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -517,7 +517,7 @@ public class Helper { // Check if viewer available if (ris == null || ris.size() == 0) { - if ("application/ms-tnef".equals(type)) + if (isTnef(type)) viewFAQ(context, 155); else { String message = context.getString(R.string.title_no_viewer, @@ -530,7 +530,7 @@ public class Helper { try { context.startActivity(intent); } catch (ActivityNotFoundException ex) { - if ("application/ms-tnef".equals(type)) + if (isTnef(type)) viewFAQ(context, 155); else { String message = context.getString(R.string.title_no_viewer, @@ -541,6 +541,12 @@ public class Helper { } } + private static boolean isTnef(String type) { + // https://en.wikipedia.org/wiki/Transport_Neutral_Encapsulation_Format + return ("application/ms-tnef".equals(type) || + "application/vnd.ms-tnef".equals(type)); + } + static void view(Context context, Intent intent) { Uri uri = intent.getData(); if ("http".equals(uri.getScheme()) || "https".equals(uri.getScheme()))