[Android] Enforce encoding of provided uris
Geoffrey Métais
git at videolan.org
Fri Aug 3 11:36:26 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Aug 3 11:33:19 2018 +0200| [706a814baf251abc44154ecba9f34877aba6f416] | committer: Geoffrey Métais
Enforce encoding of provided uris
Fix #630
> https://code.videolan.org/videolan/vlc-android/commit/706a814baf251abc44154ecba9f34877aba6f416
---
vlc-android/src/org/videolan/vlc/StartActivity.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/StartActivity.java b/vlc-android/src/org/videolan/vlc/StartActivity.java
index 2737911df..c9c788795 100644
--- a/vlc-android/src/org/videolan/vlc/StartActivity.java
+++ b/vlc-android/src/org/videolan/vlc/StartActivity.java
@@ -116,10 +116,10 @@ public class StartActivity extends FragmentActivity implements StoragePermission
}
private void startPlaybackFromApp(Intent intent) {
+ intent.setData(Uri.parse(Uri.encode(Uri.decode(intent.getDataString()), ".-_~/()&!$*+,;='@:")));
if (intent.getType() != null && intent.getType().startsWith("video"))
startActivity(intent.setClass(this, VideoPlayerActivity.class));
- else
- MediaUtils.INSTANCE.openMediaNoUi(intent.getData());
+ else MediaUtils.INSTANCE.openMediaNoUi(intent.getData());
finish();
}
More information about the Android
mailing list