[Android] Medialibrary: Ignore content:// uri requests
Geoffrey Métais
git at videolan.org
Tue Nov 20 17:36:04 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Nov 20 17:27:34 2018 +0100| [279ce60e264324831e0a926c8fadc3522c8396eb] | committer: Geoffrey Métais
Medialibrary: Ignore content:// uri requests
> https://code.videolan.org/videolan/vlc-android/commit/279ce60e264324831e0a926c8fadc3522c8396eb
---
medialibrary/src/org/videolan/medialibrary/Medialibrary.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
index a2fbe6c23..ddee424af 100644
--- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
@@ -393,12 +393,14 @@ public class Medialibrary {
@Nullable
public MediaWrapper getMedia(Uri uri) {
+ if ("content".equals(uri.getScheme())) return null;
final String vlcMrl = Tools.encodeVLCMrl(uri.toString());
return mIsInitiated && !TextUtils.isEmpty(vlcMrl) ? nativeGetMediaFromMrl(vlcMrl) : null;
}
@Nullable
public MediaWrapper getMedia(String mrl) {
+ if (mrl != null && mrl.startsWith("content:")) return null;
final String vlcMrl = Tools.encodeVLCMrl(mrl);
return mIsInitiated && !TextUtils.isEmpty(vlcMrl) ? nativeGetMediaFromMrl(vlcMrl) : null;
}
More information about the Android
mailing list