[Android] Init MediaBrowser at fragment creation

Geoffrey Métais git at videolan.org
Thu May 21 18:06:32 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu May 21 18:03:59 2015 +0200| [49b62f4cd705c5d2ef4845e5b9de90cda4ec0073] | committer: Geoffrey Métais

Init MediaBrowser at fragment creation

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=49b62f4cd705c5d2ef4845e5b9de90cda4ec0073
---

 .../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java       |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index ac708b2..cc8c237 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -108,6 +108,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
     public void onCreate(Bundle bundle){
         super.onCreate(bundle);
         mLibVLC = VLCInstance.get();
+        mMediaBrowser = new MediaBrowser(mLibVLC, this);
 
         if (bundle == null)
             bundle = getArguments();
@@ -258,8 +259,6 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
     }
 
     protected void update(){
-        if (mMediaBrowser == null)
-            mMediaBrowser = new MediaBrowser(mLibVLC, this);
         if (mReadyToDisplay) {
             updateEmptyView();
             if (mAdapter.isEmpty()) {



More information about the Android mailing list