diff options
author | Prashant Malani <pmalani@google.com> | 2014-11-15 09:46:32 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-15 09:46:33 +0000 |
commit | fb26a2c80b988118983251caf36492f2ae39559c (patch) | |
tree | ef67412396890deffbfef74b0307c55a26ca6767 | |
parent | 04b393a812bbbe9975df6e7d20514c797398d571 (diff) | |
parent | 33538249f26f0cc637eac636f3712f972916595d (diff) | |
download | frameworks_base-fb26a2c80b988118983251caf36492f2ae39559c.zip frameworks_base-fb26a2c80b988118983251caf36492f2ae39559c.tar.gz frameworks_base-fb26a2c80b988118983251caf36492f2ae39559c.tar.bz2 |
Merge "Don't animate screen brightness if there is a pending off transition" into lmp-sprout-dev
-rw-r--r-- | services/core/java/com/android/server/display/DisplayPowerController.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java index 11fe545..a2f60e4 100644 --- a/services/core/java/com/android/server/display/DisplayPowerController.java +++ b/services/core/java/com/android/server/display/DisplayPowerController.java @@ -654,11 +654,13 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call // Animate the screen brightness when the screen is on or dozing. // Skip the animation when the screen is off or suspended. - if (state == Display.STATE_ON || state == Display.STATE_DOZE) { - animateScreenBrightness(brightness, - slowChange ? BRIGHTNESS_RAMP_RATE_SLOW : BRIGHTNESS_RAMP_RATE_FAST); - } else { - animateScreenBrightness(brightness, 0); + if (!mPendingScreenOff) { + if (state == Display.STATE_ON || state == Display.STATE_DOZE) { + animateScreenBrightness(brightness, + slowChange ? BRIGHTNESS_RAMP_RATE_SLOW : BRIGHTNESS_RAMP_RATE_FAST); + } else { + animateScreenBrightness(brightness, 0); + } } // Determine whether the display is ready for use in the newly requested state. |