This commit is contained in:
M66B 2020-10-04 12:17:37 +02:00
parent b4ad4d72d3
commit 57e74ff227
1 changed files with 8 additions and 2 deletions

View File

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