OSDN Git Service

Calc job standby runnability based on last job execution...
authorChristopher Tate <ctate@google.com>
Thu, 18 Jan 2018 20:59:15 +0000 (12:59 -0800)
committerChristopher Tate <ctate@google.com>
Wed, 24 Jan 2018 21:13:12 +0000 (13:13 -0800)
commit435c2f4820cb92e771a5083678bf3be5d3e6508e
tree22dfb6496150f067406ff12f24c6948c3f0ca835
parentedf9ab2b4a435171125dbc77f9be3e7b0af44fe2
Calc job standby runnability based on last job execution...

...not unilaterally on the current time of day.  In practice, the point
is that we should let an app run new jobs immediately if it's been a long
time since it ran any, even if it's in a less-active standby bucket,
because it's being a good citizen.

Jobs for apps in the NEVER bucket (e.g. sync jobs inflated at boot time)
are also treated as immediately runnable.  They won't be run at all until
the app is brought out of standby, so we just treat such apps as good
citizens.

Bug: 63527785
Test: atest CtsJobSchedulerTestCases
Change-Id: If5e3dc18757caf96ba80835f098b48614dda1d9d
services/core/java/com/android/server/job/JobSchedulerInternal.java
services/core/java/com/android/server/job/JobSchedulerService.java
services/core/java/com/android/server/job/controllers/JobStatus.java