Watchdog: conditionally check network

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

@ -876,7 +876,9 @@ 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);
updateNetworkState(null, "watchdog");
if (lastNetworkState == null || !lastNetworkState.isSuitable())
updateNetworkState(null, "watchdog");
} }
private NotificationCompat.Builder getNotificationService(Integer accounts, Integer operations) { private NotificationCompat.Builder getNotificationService(Integer accounts, Integer operations) {

Loading…
Cancel
Save