From e9435724c3281873d43174d870ff25ce82f0e555 Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Fri, 22 Mar 2024 10:25:22 +0100 Subject: [PATCH] Schedule workers only when Mainactivity is instantiated --- .../org/openobservatory/ooniprobe/activity/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/openobservatory/ooniprobe/activity/MainActivity.java b/app/src/main/java/org/openobservatory/ooniprobe/activity/MainActivity.java index e656e059b..025f442b1 100644 --- a/app/src/main/java/org/openobservatory/ooniprobe/activity/MainActivity.java +++ b/app/src/main/java/org/openobservatory/ooniprobe/activity/MainActivity.java @@ -146,6 +146,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { .build().show(getSupportFragmentManager(), null); } ThirdPartyServices.checkUpdates(this); + scheduleWorkers(); } if (android.os.Build.VERSION.SDK_INT >= 29) { @@ -158,7 +159,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { } } requestNotificationPermission(); - scheduleWorkers(); onNewIntent(getIntent()); }