[Android] MediaLibrary: remove mRestartContext

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:36:05 2014 +0200| [e5a4789db6d3ccf574985b5071aaca417a88322c] | committer: Jean-Baptiste Kempf

MediaLibrary: remove mRestartContext

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

 vlc-android/src/org/videolan/vlc/MediaLibrary.java |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
index bc22cc0..c0d0f18 100644
--- a/vlc-android/src/org/videolan/vlc/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
@@ -57,7 +57,6 @@ public class MediaLibrary {
     private final ReadWriteLock mItemListLock;
     private boolean isStopping = false;
     private boolean mRestart = false;
-    private Context mRestartContext;
     protected Thread mLoadingThread;
 
     private MediaLibrary() {
@@ -72,7 +71,6 @@ public class MediaLibrary {
             /* do a clean restart if a scan is ongoing */
             mRestart = true;
             isStopping = true;
-            mRestartContext = context;
         } else {
             loadMediaItems();
         }
@@ -360,8 +358,6 @@ public class MediaLibrary {
                     Log.d(TAG, "Restarting scan");
                     mRestart = false;
                     restartHandler.sendEmptyMessageDelayed(1, 200);
-                } else {
-                    mRestartContext = null;
                 }
             }
         }
@@ -378,10 +374,7 @@ public class MediaLibrary {
         public void handleMessage(Message msg) {
             MediaLibrary owner = getOwner();
             if(owner == null) return;
-            if (owner.mRestartContext != null)
-                owner.loadMediaItems();
-            else
-                Log.e(TAG, "Context lost in a black hole");
+            owner.loadMediaItems();
         }
     }
 



More information about the Android mailing list