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

Commit c55c7389 authored by Kweku Adams's avatar Kweku Adams
Browse files

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
parent c00c253b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment