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

Fix StorageController bugs.

1. StorageController was taking the return value of
setStorageNotLowConstraintSatisfied to be the previous value of the
constraint before the change. However, the return value indicates whether
or not the constraint changed. This meant that StorageController would
sometimes notify JobSchedulerService when a constraint hadn't actually
changed and would sometimes not notify JobSchedulerService when a
constraint had changed.

2. The calls to onRunJobNow and onControllerStateChanged both result in
JobSchedulerService iterating through the JobStore to identify jobs to
run. Calling both of them provides no benefit.

3. StorageController was listening for the STORAGE_LOW intent but wasn't
actually updating job statuses so jobs would continue to run after the
storage became low.

Bug: 125531072
Test: atest android.jobscheduler.cts.StorageConstraintTest
Change-Id: I10fa9bae3bdbd2545c15e5cab647a0820b9fbfa7
parent 407761a7
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