diff options
author | Craig Mautner <cmautner@google.com> | 2012-03-13 11:38:38 -0700 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2012-03-13 11:38:38 -0700 |
commit | 44bf70fba26146d7e788ec051ee4ab45336de2fa (patch) | |
tree | 5def88d3fd089522666bb6ba6cd3012966fc640e /services/java/com/android/server/PowerManagerService.java | |
parent | 5d1907b2f3e624dc838e9658a1986636252ac8b1 (diff) |
Set the reason for screen-off before usage.
An occasional call sequence through updateLightsLocked ended up storing
the old screen-off reason rather than the current screen-off reason.
This caused the Keyguard screen to be bypassed when turning back on. By
saving the power-off reason in mScreenOffReason prior to calling
updateLightsLocked we eliminate this problem.
The offending calling sequence was:
PowerManagerService.setPowerState(..., reason) => updateLightsLocked
=> animateTo => screenOffFinishedAminatingLocked(mScreenOffReason)
=> sendNotificationLocked.
Change-Id: I8ee0b3226f94af7ff7e7b7b0bf54e47fd0c03631
Diffstat (limited to 'services/java/com/android/server/PowerManagerService.java')
-rw-r--r-- | services/java/com/android/server/PowerManagerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java index 63418db2cb33..52a411074da9 100644 --- a/services/java/com/android/server/PowerManagerService.java +++ b/services/java/com/android/server/PowerManagerService.java @@ -1858,6 +1858,7 @@ public class PowerManagerService extends IPowerManager.Stub } else { // Update the lights *before* taking care of turning the // screen off, so we can initiate any animations that are desired. + mScreenOffReason = reason; if (stateChanged) { updateLightsLocked(newState, 0); } @@ -1876,7 +1877,6 @@ public class PowerManagerService extends IPowerManager.Stub Binder.restoreCallingIdentity(identity); } mPowerState &= ~SCREEN_ON_BIT; - mScreenOffReason = reason; if (!mScreenBrightnessAnimator.isAnimating()) { err = screenOffFinishedAnimatingLocked(reason); } else { |