[Android] Fix Uri encoding issue
Nicolas Pomepuy
git at videolan.org
Tue Oct 6 10:58:46 CEST 2020
vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Oct 1 09:51:13 2020 +0200| [3b3deea7b13522a84b29ddf6165e738df8422978] | committer: Nicolas Pomepuy
Fix Uri encoding issue
(cherry picked from commit c0d87b421995ef2f7d949f3e34d80363d3b35b1b)
> https://code.videolan.org/videolan/vlc-android/commit/3b3deea7b13522a84b29ddf6165e738df8422978
---
application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt b/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
index 5d496a33d..8b9ea4261 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
@@ -98,7 +98,7 @@ object FileUtils {
return ""
val columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA)
cursor.moveToFirst()
- return cursor.getString(columnIndex)
+ return Uri.fromFile(File(cursor.getString(columnIndex))).toString()
} catch (e: IllegalArgumentException) {
return ""
} catch (e: SecurityException) {
More information about the Android
mailing list