OSDN Git Service

Hold Display Suspend blocker when going to Doze
authorSantos Cordon <santoscordon@google.com>
Thu, 19 Sep 2019 15:59:01 +0000 (16:59 +0100)
committerSantos Cordon <santoscordon@google.com>
Fri, 20 Sep 2019 15:59:13 +0000 (15:59 +0000)
commit0304438936c1f3c79cf61e5e994a9c2446b4db7a
tree162a6e56462f2be259a84634c157a3f111649b24
parentc854ee68d0f38f8bbf5cf6c2541681e03c603405
Hold Display Suspend blocker when going to Doze

The transition to Doze is asynchronous from the release of the display
suspend blocker.  This created a race condition where we could
potentially suspend before Doze service had a chance to transition to
Doze. This change holds the Display Suspend blocker until Doze service
acquires the DOZE lock.

Bug: 138828701
Test: atest PowerManagerService
Test: Manual, verify no repro of the bug.  Additional verify the device
does release the Display suspend blocker once we are in DOZE.

Change-Id: I777bc7963b1ab445378164b0f4d3f79113510b81
services/core/java/com/android/server/power/PowerManagerService.java