Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6aabd50f authored by Kweku Adams's avatar Kweku Adams
Browse files

Fix rescheduling of jobs with large periods.

We were accidentally skipping execution windows of jobs with large
periods if the job was deferred by 30+ minutes, even if the next window
would have been days later. For example, if a periodic job with a period of
7 days and flex of 1 day was scheduled at t0, its original window would
be [t6, t7]. If it ended up running at t7+35minutes, JS would reschedule
the next iteration for [t20, t21], even though it would be safe to
schedule it for [t13, t14]. This change fixes the rescheduling so we
don't skip the next window unless we are actually close to the start of
the next window.

Bug: 229135653
Test: atest FrameworksMockingServicesTests:JobSchedulerServiceTest
Change-Id: I068628e96529b834c5b68e9e25fa130f40f0eef9
parent 1408bbe9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment