OSDN Git Service

Fix issue #38244875: Bring back testChargingConstraintFails
authorDianne Hackborn <hackbod@google.com>
Tue, 16 May 2017 20:14:37 +0000 (13:14 -0700)
committerDianne Hackborn <hackbod@google.com>
Tue, 16 May 2017 20:16:26 +0000 (13:16 -0700)
commit6d06826b2424f5d937bf97576d3b51169c576fc5
treee6d65efa91c7e47dd85e6bd40897a700f3250faf
parentc75bd416e9e8131f773bd0e6f89c2495d531917a
Fix issue #38244875: Bring back testChargingConstraintFails

- Add new "get-job-state" shell command that the tests can use
  to find out what is going on with a job.
- Fix an issue in the battery controller where it would not
  immediately stop with a "battery not low" constraint when
  the battery becomes low.
- Also an optimization to rescheduling jobs, for every scheduled
  job that is not ready don't look to see if it is active.
  Instead, go through the active jobs and see if any are no
  longer ready.

Test: bit -t CtsJobSchedulerTestCases:*

Change-Id: I5611886653258ca337eee97c5ee1b9b3dfdb6d85
services/core/java/com/android/server/job/JobSchedulerService.java
services/core/java/com/android/server/job/JobSchedulerShellCommand.java
services/core/java/com/android/server/job/controllers/BatteryController.java