|
|
|
@ -662,6 +662,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
|
onAlarm(intent);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "watchdog":
|
|
|
|
|
onWatchdog(intent);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
Log.w("Unknown action: " + action);
|
|
|
|
|
}
|
|
|
|
@ -713,6 +717,11 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
|
liveAccountNetworkState.post(command);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void onWatchdog(Intent intent) {
|
|
|
|
|
schedule(this);
|
|
|
|
|
onEval(intent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private NotificationCompat.Builder getNotificationService(Integer accounts, Integer operations) {
|
|
|
|
|
if (accounts != null)
|
|
|
|
|
this.lastAccounts = accounts;
|
|
|
|
@ -1910,4 +1919,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
|
new Intent(context, ServiceSynchronize.class)
|
|
|
|
|
.setAction("alarm"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void watchdog(Context context) {
|
|
|
|
|
ContextCompat.startForegroundService(context,
|
|
|
|
|
new Intent(context, ServiceSynchronize.class)
|
|
|
|
|
.setAction("watchdog"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|