aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-03-07 23:37:51 +0100
committerlookshe <github@lookshe.org>2016-03-07 23:37:51 +0100
commit6578ecfe0e79c1d00d2282e05e28d5a4c950b687 (patch)
tree9d0c6d4a2dd4e1299b0cb546f3d177d758b4576c /src/main/java/eu/siacs
parente9b5793cefd6fd8a24a6bf710493c9bc1800850f (diff)
corrected getRealPathFromUri
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/FileUtils.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/FileUtils.java b/src/main/java/eu/siacs/conversations/utils/FileUtils.java
index ad8b8640..c5d0c3b0 100644
--- a/src/main/java/eu/siacs/conversations/utils/FileUtils.java
+++ b/src/main/java/eu/siacs/conversations/utils/FileUtils.java
@@ -1,6 +1,7 @@
package eu.siacs.conversations.utils;
import android.annotation.SuppressLint;
+import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
@@ -76,11 +77,11 @@ public class FileUtils {
}
}
// MediaStore (and general)
- else if ("content".equalsIgnoreCase(uri.getScheme())) {
+ else if (ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) {
return getDataColumn(context, uri, null, null);
}
// File
- else if ("file".equalsIgnoreCase(uri.getScheme())) {
+ else if (ContentResolver.SCHEME_FILE.equals(uri.getScheme())) {
return uri.getPath();
}