-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Disabling sync not working when previously was enabled (interval > 0). When sync interval is disabled, then previously scheduled service intent are starting.
Previously scheduled intents schould be removed when interval is <= 0.
public void schedule(Intent intent, long interval) {
if (isScheduled(intent)) {
unschedule(intent);
}
if (interval < 1) {
logger.error("Tried to schedule an interval less than 1");
return;
}
PendingIntent pendingIntent = pendingIntentFactory.getPendingIntent(intent);
setRepeating(interval, pendingIntent, intent);
logger.info("Scheduled {}", intent.getComponent().toShortString());
}
Metadata
Metadata
Assignees
Labels
No labels