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

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

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
parent ef2bb53c
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