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

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

Shift job readiness re-evaluation check.

Sometimes controllers actually update their relative bit on the job
when the JobSchedulerService double checks with controllers. However,
if JSS is looping through the changedJobs list when this happens, the
controller will tell JSS of the change, but adding it to the changedJobs
list will be a no-op so the job won't be added to the pending job list.
And if the controller gets a callback and evaluate the job on its own,
the bit won't change and so the job won't be added to the changedJobs
list. This leads to inconsistent behavior based on timing/order of
operations. Shifting the controller re-evaluation to when we're
determine the job's readiness fixes the issue.

Bug: 263216453
Bug: 263699506
Bug: 271128261
Test: atest --rerun-until-failure 50 android.jobscheduler.cts.JobThrottlingTest#testRestrictedEJAllowedWhenAutoRestrictedBucketFeatureOn
Test: atest FrameworksMockingServicesTests:JobSchedulerServiceTest
Change-Id: Idb41cf030f63c697adb8e7bfebc132019f9dffbc
parent 728b80a3
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