use context.getApplicationContext in MediaLibrary.

This ensures that we are not handing an Activity to our children
This commit is contained in:
Adrian Ulrich 2017-08-05 12:28:48 +02:00
parent 6bbc3800c2
commit 6bc3976dbb

View File

@ -108,8 +108,8 @@ public class MediaLibrary {
// -> unlikely
synchronized(sWait) {
if (sBackend == null) {
sBackend = new MediaLibraryBackend(context);
sScanner = new MediaScanner(context, sBackend);
sBackend = new MediaLibraryBackend(context.getApplicationContext());
sScanner = new MediaScanner(context.getApplicationContext(), sBackend);
sScanner.startQuickScan(50);
}
}