Watchdog: conditionally check network

This commit is contained in:
M66B 2021-02-24 08:53:55 +01:00
parent 581596e616
commit 460592ffff
1 changed files with 3 additions and 1 deletions

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) {