mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-31 19:41:19 +00:00
Reinitialize poll on schedule
This commit is contained in:
parent
c56e011201
commit
a45674596a
1 changed files with 2 additions and 3 deletions
|
@ -1198,9 +1198,6 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
// Restore schedule
|
// Restore schedule
|
||||||
schedule(context);
|
schedule(context);
|
||||||
|
|
||||||
// Initialize polling
|
|
||||||
WorkerPoll.init(context);
|
|
||||||
|
|
||||||
// Conditionally init service
|
// Conditionally init service
|
||||||
boolean enabled = prefs.getBoolean("enabled", true);
|
boolean enabled = prefs.getBoolean("enabled", true);
|
||||||
int pollInterval = prefs.getInt("poll_interval", 0);
|
int pollInterval = prefs.getInt("poll_interval", 0);
|
||||||
|
@ -1283,6 +1280,8 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
am.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, next, piAlarm);
|
am.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, next, piAlarm);
|
||||||
else
|
else
|
||||||
am.set(AlarmManager.RTC_WAKEUP, next, piAlarm);
|
am.set(AlarmManager.RTC_WAKEUP, next, piAlarm);
|
||||||
|
|
||||||
|
WorkerPoll.init(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reschedule(Context context) {
|
static void reschedule(Context context) {
|
||||||
|
|
Loading…
Reference in a new issue