pull/187/head
M66B 4 years ago
parent b4ad4d72d3
commit 57e74ff227

@ -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()))

Loading…
Cancel
Save