diff options
author | Kweku Adams <kwekua@google.com> | 2019-04-30 11:54:48 -0700 |
---|---|---|
committer | Kweku Adams <kwekua@google.com> | 2019-04-30 12:03:34 -0700 |
commit | c9793092e3c570257de92350f30e2effb2bd1171 (patch) | |
tree | 77dcc3af27364625b572f71c0cc6c834ac573c92 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | ebc87475460adefb5c8c7ce8e36178162bd51934 (diff) |
Fix periodic job scheduling.
If a periodic job was run outside of its expected window (eg: because of
Doze mode or its constraints were unmet for a long time), then
JobSchedulerService would schedule the next one with a window starting
right now, which could cause the job to run again immediately.
This change addresses the issue by:
1. Switching to having consistent windows based on when the job was
scheduled. This also helps developers know when to expect jobs to run.
2. If a job runs in a different window, its run counts toward that
window instead.
3. For jobs with a custom flex setting, the next window is skipped if
the job is run to close to the next window.
Bug: 123248627
Test: atest com.android.server.job.JobSchedulerServiceTest
Test: atest CtsJobSchedulerTestCases
Change-Id: Ic18929e9d03e704ec43aa50fe37c64cd6807cf68
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions