[Android] Remove Context passing for MediaLibrary.loadMediaItems()

Jean-Baptiste Kempf git at videolan.org
Sun Jul 6 08:24:11 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jul  6 07:34:21 2014 +0200| [d7babc509b0021b72c4a0ec64023af978dc5a0ab] | committer: Jean-Baptiste Kempf

Remove Context passing for MediaLibrary.loadMediaItems()

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

 vlc-android/src/org/videolan/vlc/MediaLibrary.java     |    6 +++---
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
index a59d156..bc22cc0 100644
--- a/vlc-android/src/org/videolan/vlc/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
@@ -74,11 +74,11 @@ public class MediaLibrary {
             isStopping = true;
             mRestartContext = context;
         } else {
-            loadMediaItems(context);
+            loadMediaItems();
         }
     }
 
-    public void loadMediaItems(Context context) {
+    public void loadMediaItems() {
         if (mLoadingThread == null || mLoadingThread.getState() == State.TERMINATED) {
             isStopping = false;
             VideoGridFragment.actionScanStart();
@@ -379,7 +379,7 @@ public class MediaLibrary {
             MediaLibrary owner = getOwner();
             if(owner == null) return;
             if (owner.mRestartContext != null)
-                owner.loadMediaItems(owner.mRestartContext);
+                owner.loadMediaItems();
             else
                 Log.e(TAG, "Context lost in a black hole");
         }
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 328c5d9..ae7d44d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -331,7 +331,7 @@ public class MainActivity extends ActionBarActivity {
 
         /* Load media items from database and storage */
         if (mScanNeeded)
-            MediaLibrary.getInstance(this).loadMediaItems(this);
+            MediaLibrary.getInstance(this).loadMediaItems();
     }
 
     @Override



More information about the Android mailing list