OSDN Git Service

Fix power manager display wake lock bugs.
authorJeff Brown <jeffbrown@google.com>
Wed, 12 Mar 2014 06:02:35 +0000 (23:02 -0700)
committerJeff Brown <jeffbrown@google.com>
Wed, 12 Mar 2014 06:23:58 +0000 (23:23 -0700)
commit2d8a3908d2b0a74ccdecd97e86e7bfda1caa218e
tree9139da1324279fd463a1d7f27593ff2886297790
parentcc9894c82559d63b1ae89635b0ae9965e03d598e
Fix power manager display wake lock bugs.

Under certain circumstances, the power manager might continue to
hold the display wakelock long after the display had been turned
off due to the mDisplayReady flag having an incorrect value.

1. An inverted conditional caused DisplayPowerState to incorrectly
signal the screen on ready state.

2. The DisplayPowerController failed to clear the block screen on
flag in the case where the screen was turned off before it became
unblocked from turning on.  This could happen when the display was
rapidly turned on-off-on-off.

Bug: 13248135
Change-Id: I8faa3034695c83c8cd35613d81acccf40d22128d
services/core/java/com/android/server/power/DisplayPowerController.java
services/core/java/com/android/server/power/DisplayPowerState.java
services/core/java/com/android/server/power/PowerManagerService.java