Commit d7babc50 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Remove Context passing for MediaLibrary.loadMediaItems()

parent 9f804c8e
...@@ -74,11 +74,11 @@ public class MediaLibrary { ...@@ -74,11 +74,11 @@ public class MediaLibrary {
isStopping = true; isStopping = true;
mRestartContext = context; mRestartContext = context;
} else { } else {
loadMediaItems(context); loadMediaItems();
} }
} }
public void loadMediaItems(Context context) { public void loadMediaItems() {
if (mLoadingThread == null || mLoadingThread.getState() == State.TERMINATED) { if (mLoadingThread == null || mLoadingThread.getState() == State.TERMINATED) {
isStopping = false; isStopping = false;
VideoGridFragment.actionScanStart(); VideoGridFragment.actionScanStart();
...@@ -379,7 +379,7 @@ public class MediaLibrary { ...@@ -379,7 +379,7 @@ public class MediaLibrary {
MediaLibrary owner = getOwner(); MediaLibrary owner = getOwner();
if(owner == null) return; if(owner == null) return;
if (owner.mRestartContext != null) if (owner.mRestartContext != null)
owner.loadMediaItems(owner.mRestartContext); owner.loadMediaItems();
else else
Log.e(TAG, "Context lost in a black hole"); Log.e(TAG, "Context lost in a black hole");
} }
......
...@@ -331,7 +331,7 @@ public class MainActivity extends ActionBarActivity { ...@@ -331,7 +331,7 @@ public class MainActivity extends ActionBarActivity {
/* Load media items from database and storage */ /* Load media items from database and storage */
if (mScanNeeded) if (mScanNeeded)
MediaLibrary.getInstance(this).loadMediaItems(this); MediaLibrary.getInstance(this).loadMediaItems();
} }
@Override @Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment