Keep alive via the watchdog

This commit is contained in:
M66B
2021-03-29 20:08:35 +02:00
parent 5a79409ed3
commit 7b5d25b56c
3 changed files with 7 additions and 15 deletions

View File

@@ -2502,12 +2502,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
}
static void watchdog(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean enabled = prefs.getBoolean("enabled", true);
if (enabled)
start(context,
new Intent(context, ServiceSynchronize.class)
.setAction("watchdog"));
start(context,
new Intent(context, ServiceSynchronize.class)
.setAction("watchdog"));
}
static void restart(Context context) {