aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorSam Whited <sam@samwhited.com>2015-01-17 20:53:25 -0500
committerSam Whited <sam@samwhited.com>2015-01-17 20:53:25 -0500
commit83c806a774a09d54a0ef84ec5400c348256ff03b (patch)
tree689b347b830ddc864dce6b0bd12ed7912293048c /src/main
parentc17005218f454397535bcbddf09ecf75553fb2b8 (diff)
Fix string substitutions with unknown filetypes
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java4
-rw-r--r--src/main/res/values/strings.xml1
2 files changed, 3 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 f468d9ae0..86bc3f387 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/")) {
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index fb6878ce9..e9699745d 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>