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 {
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");
}
......
......@@ -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
......
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