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

Scheduling start alarm when job starts off out of quota.

Up until now, QuotaController was only scheduling the quota check alarm
when an app ran out of quota while a job was running, the UID proc state
or standby bucket changed, the device was unplugged, the parole state
changed, or quota controller constants changed. However, if a job was
scheduled and already out of quota (which could be the case due to
job count throttling), an alarm wasn't scheduled. This meant that alarms
throttled due to high job counts probably wouldn't run until the device
was plugged in or the app changed its standby bucket or proc state. Now,
we schedule an alarm if a newly scheduled job is already out of quota so
that it will come back into quota at the proper time.

Bug: 131267600
Test: atest com.android.server.job.controllers.QuotaControllerTest
Test: atest CtsJobSchedulerTestCases
Change-Id: I802b0aa076690451d901521327c4ddab111c42f6
parent a23242a4
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