[Android] Fix reading intent from third party apps by converting it sooner
Nicolas Pomepuy
git at videolan.org
Tue Oct 26 06:45:24 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Oct 25 07:47:09 2021 +0200| [a87a43fec07b1068b765f5e64b6cce7871f4de59] | committer: Nicolas Pomepuy
Fix reading intent from third party apps by converting it sooner
Fixes #2224
> https://code.videolan.org/videolan/vlc-android/commit/a87a43fec07b1068b765f5e64b6cce7871f4de59
---
application/vlc-android/src/org/videolan/vlc/StartActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/StartActivity.kt b/application/vlc-android/src/org/videolan/vlc/StartActivity.kt
index 28a7cc612..47edf7255 100644
--- a/application/vlc-android/src/org/videolan/vlc/StartActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/StartActivity.kt
@@ -114,7 +114,7 @@ class StartActivity : FragmentActivity() {
val cd = intent.clipData
val item = if (cd != null && cd.itemCount > 0) cd.getItemAt(0) else null
if (item != null) {
- var uri: Uri? = item.uri
+ var uri: Uri? = FileUtils.getUri(item.uri)
if (uri == null && item.text != null) uri = item.text.toString().toUri()
if (uri != null) {
MediaUtils.openMediaNoUi(uri)
More information about the Android
mailing list