Delaying jobs while coming out of doze
Foreground uids can run their jobs immediately given other constraints
are met. Other jobs will be delayed by 3 seconds when coming out of
doze to ensure imminent user tasks like screen-on can use resources.
Also added an API to allow apps to indicate their job is important to
the user enough that it is allowed to run when the app is in the
foreground or on the temp whitelist regardless of the dozing state of
the device.
Test: cts-tradefed run singleCommand cts-dev -m JobScheduler -t \
android.jobscheduler.cts.DeviceIdleJobsTest
Bug: 64291952
Bug: 64071030
Change-Id: Id52cb4386e683d4f8297e873b3a68c573e5be743
8 files changed