Watchdog: conditionally check network

This commit is contained in:
M66B
2021-02-24 08:53:55 +01:00
parent 581596e616
commit 460592ffff

View File

@@ -876,7 +876,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
private void onWatchdog(Intent intent) {
EntityLog.log(this, "Watchdog");
schedule(this, false);
updateNetworkState(null, "watchdog");
if (lastNetworkState == null || !lastNetworkState.isSuitable())
updateNetworkState(null, "watchdog");
}
private NotificationCompat.Builder getNotificationService(Integer accounts, Integer operations) {