From 8635f218692b0509b3b2ff5a5e929cc5aa5a4a18 Mon Sep 17 00:00:00 2001 From: Courville Software Date: Thu, 19 Dec 2024 22:14:00 +0100 Subject: [PATCH] See https://github.com/nova-video-player/aos-AVP/issues/1347 --- src/com/archos/mediaprovider/video/VideoStoreImportService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/archos/mediaprovider/video/VideoStoreImportService.java b/src/com/archos/mediaprovider/video/VideoStoreImportService.java index da13eeab..ba535e64 100644 --- a/src/com/archos/mediaprovider/video/VideoStoreImportService.java +++ b/src/com/archos/mediaprovider/video/VideoStoreImportService.java @@ -318,6 +318,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { public static void startService(Context context) { // this one is called only by VideoProvider at start or when app turns background->foreground log.debug("startService"); + if (! ProcessLifecycleOwner.get().getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) return; mContext = context; Intent intent = new Intent(context, VideoStoreImportService.class); ArchosUtils.addBreadcrumb(SentryLevel.INFO, "VideoStoreImportService.startService", "app in foreground calling startService");