Commit 6cf57665 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Delay storages check

Ensure app is foreground when we start service

(cherry picked from commit f32739cf)
parent 89e755fd
......@@ -76,14 +76,18 @@ public class ExternalMonitor extends BroadcastReceiver {
ctx.registerReceiver(instance, networkFilter);
ctx.registerReceiver(instance, storageFilter);
if (AndroidUtil.isICSOrLater)
private static void checkNewStorages(final Context ctx) {
if (VLCApplication.getMLInstance().isInitiated())
if (AndroidUtil.isICSOrLater && VLCApplication.getMLInstance().isInitiated())
new Handler(Looper.getMainLooper()).post(new Runnable() {
public void run() {
ctx.startService(new Intent(Constants.ACTION_CHECK_STORAGES, null,ctx, MediaParsingService.class));
static void unregister(Context ctx) {
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