Expose job priority API.
The API allows apps to indicate job execution preference. Ordering is done between an app's own jobs. * Expedited jobs can only be MAX or HIGH priority (with MAX as the default value). Regular jobs can only be HIGH, DEFAULT, LOW, or MIN priority (with DEFAULT as the default value). Periodic and prefetch jobs cannot be HIGH priority. EJs are always ordered ahead of regular jobs, even if both are HIGH priority. * HIGH priority jobs have a standard timeout of at least 4 minutes (5 as default), while DEFAULT and below maintain their 10 minute timeout. * To prevent certain starvation cases (where lower priority jobs continue to be deferred because higher priority jobs are retried and run ahead of the lower priority jobs), priorities will decay as a job is repeatedly retried. Bug: 142272435 Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job Test: atest CtsJobSchedulerTestCases Change-Id: I583d7436bea4975e2f0aecc4019712afdcd0ea77
Loading
Please register or sign in to comment