[Android] Check ML is init when adding an external media
Geoffrey Métais
geoffrey.metais at gmail.com
Wed Jan 4 18:47:18 CET 2017
This is more to be extra-safe.
But it could be:
- if user doesn't grant storage read permission at runtime (Android 6+)
- If video player is launched from 3rd party app (until we manage to
partially init the ML for this case)
On Wed, Jan 4, 2017 at 2:40 PM Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
> On 01/03/2017 05:13 PM, Geoffrey Métais wrote:
> > vlc-android | branch: master | Geoffrey Métais <
> geoffrey.metais at gmail.com> | Tue Jan 3 17:08:40 2017 +0100|
> [e9a55720d59e7ae17ada0f480fb90a6cbac818e1] | committer: Geoffrey Métais
> >
> > Check ML is init when adding an external media
> >
> >>
> https://code.videolan.org/videolan/vlc-android/commit/e9a55720d59e7ae17ada0f480fb90a6cbac818e1
> > ---
> >
> > medialibrary/src/org/videolan/medialibrary/Medialibrary.java | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
> b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
> > index 93b1fda..67f674a 100644
> > --- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
> > +++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
> > @@ -206,7 +206,7 @@ public class Medialibrary {
> > }
> >
> > public MediaWrapper addMedia(String mrl) {
> > - return nativeAddMedia(mrl);
> > + return mIsInitiated ? nativeAddMedia(mrl) : null;
> > }
> >
> > public long getId() {
> >
> > _______________________________________________
> > Android mailing list
> > Android at videolan.org
> > https://mailman.videolan.org/listinfo/android
> >
> Is there a case where the ML could be uninitialized while the user is
> able to insert an external media?
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20170104/b1ffd0bb/attachment-0001.html>
More information about the Android
mailing list