mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-24 16:53:37 +00:00
Always run watchdog on app start
This commit is contained in:
parent
a48d434153
commit
b0dd941d69
1 changed files with 9 additions and 1 deletions
|
@ -128,7 +128,15 @@ public class ApplicationEx extends Application implements SharedPreferences.OnSh
|
|||
|
||||
DisconnectBlacklist.init(this);
|
||||
|
||||
WorkerWatchdog.init(this);
|
||||
boolean watchdog = prefs.getBoolean("watchdog", true);
|
||||
boolean enabled = prefs.getBoolean("enabled", true);
|
||||
if (watchdog && enabled)
|
||||
WorkerWatchdog.init(this);
|
||||
else {
|
||||
ServiceSynchronize.watchdog(this);
|
||||
ServiceSend.watchdog(this);
|
||||
}
|
||||
|
||||
WorkerCleanup.init(this);
|
||||
|
||||
registerReceiver(onScreenOff, new IntentFilter(Intent.ACTION_SCREEN_OFF));
|
||||
|
|
Loading…
Reference in a new issue