Loading
Hold wakelock earlier.
Start holding a wakelock from the instant we decide to start running a job instead of waiting until the JobService is bound. This ensures that: 1. The CPU doesn't go to suspend between when we tell controllers that the job is starting, when we start the service, and when we successfully bind to the service 2. Execution timing is accurate and we don't accidentally count CPU sleep time as execution time. Bug: 189985233 Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job Test: atest CtsJobSchedulerTestCases Change-Id: I95afa1e8d78448b8c8ee31ce5d9b68821318a23a