OSDN Git Service

Clean up job concurrency calculation
authorMakoto Onuki <omakoto@google.com>
Sat, 15 Dec 2018 00:34:59 +0000 (16:34 -0800)
committerMakoto Onuki <omakoto@google.com>
Mon, 17 Dec 2018 23:50:20 +0000 (23:50 +0000)
commit0f6499c50b394833a8577642a22c16c2ad9e5bb4
tree31c2545bebc03335ed471ace618743f26c51b1d8
parentf2b297125b6ac90830b2b7617720115d6a24df97
Clean up job concurrency calculation

- Mostly variable renaming and comments.
- A few bugs have been fixed.
- I *think* the max job count check is not working as intended, but we don't
fix it yet.

Bug: 111360323
Test: atest CtsJobSchedulerTestCases

Summary
-------
CtsJobSchedulerTestCases: Passed: 33, Failed: 5

5 tests failed
--------------
android.jobscheduler.cts.BatteryConstraintTest#testBatteryNotLowConstraintFails_withoutPower
android.jobscheduler.cts.ConnectivityConstraintTest#testConnectivityConstraintExecutes_metered
android.jobscheduler.cts.ConnectivityConstraintTest#testConnectivityConstraintExecutes_withMobile
android.jobscheduler.cts.ConnectivityConstraintTest#testUnmeteredConstraintFails_withMobile
android.jobscheduler.cts.TimingConstraintsTest#testJobParameters_unexpiredDeadline

(Unchanged from the ToT result)

Change-Id: I9f0fe8c18265652ca2b6217b3f6540aa7233b7c0
services/core/java/com/android/server/job/JobConcurrencyManager.java
services/core/java/com/android/server/job/JobSchedulerService.java