aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java8
-rw-r--r--src/main/res/values/strings.xml3
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
index f468d9ae..b2ca8e4a 100644
--- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
@@ -175,10 +175,10 @@ public class UIHelper {
try {
mime = URLConnection.guessContentTypeFromName(path);
} catch (final StringIndexOutOfBoundsException ignored) {
- return "";
+ return context.getString(R.string.file);
}
if (mime == null) {
- return "";
+ return context.getString(R.string.file);
} else if (mime.startsWith("audio/")) {
return context.getString(R.string.audio);
} else if(mime.startsWith("video/")) {
@@ -187,6 +187,10 @@ public class UIHelper {
return context.getString(R.string.image);
} else if (mime.contains("pdf")) {
return context.getString(R.string.pdf_document) ;
+ } else if (mime.contains("application/vnd.android.package-archive")) {
+ return context.getString(R.string.apk) ;
+ } else if (mime.contains("vcard")) {
+ return context.getString(R.string.vcard) ;
} else {
return mime;
}
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index fb6878ce..8baf794a 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -362,6 +362,7 @@
<string name="choose_file">Choose file</string>
<string name="receiving_x_file">Receiving %1$s (%2$d%% completed)</string>
<string name="download_x_file">Download %s</string>
+ <string name="file">file</string>
<string name="open_x_file">Open %s</string>
<string name="sending_file">sending (%1$d%% completed)</string>
<string name="preparing_file">Preparing file for transmission</string>
@@ -440,6 +441,8 @@
<string name="video">video file</string>
<string name="image">image file</string>
<string name="pdf_document">PDF document</string>
+ <string name="apk">Android App</string>
+ <string name="vcard">Contact</string>
<string name="received_x_file">Received %s</string>
<string name="disable_foreground_service">Disable foreground service</string>
<string name="touch_to_open_conversations">Touch to open Conversations</string>