Watchdog: conditionally check network

pull/194/head
M66B 5 years ago
parent 581596e616
commit 460592ffff

@ -876,6 +876,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
private void onWatchdog(Intent intent) { private void onWatchdog(Intent intent) {
EntityLog.log(this, "Watchdog"); EntityLog.log(this, "Watchdog");
schedule(this, false); schedule(this, false);
if (lastNetworkState == null || !lastNetworkState.isSuitable())
updateNetworkState(null, "watchdog"); updateNetworkState(null, "watchdog");
} }

Loading…
Cancel
Save