Set the brightness to zero on screen-off

Fixes b/6996990

Ideally, the HWC HAL should turn off the backlight when the display is turned
off.  This patch enforces this at the PowerManager, which can guard against
errant HWC implementations.

Change-Id: Ibb826a02871c983f8a68034d010e68abe9c5c1d5
Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
Iliyan Malchev
2012-08-16 12:47:21 -07:00
parent ca34bcf674
commit 122415f5c8

View File

@@ -242,8 +242,8 @@ final class DisplayPowerState {
mElectronBeam.draw(mElectronBeamLevel);
}
if ((mDirty & DIRTY_BRIGHTNESS) != 0) {
mScreenBrightnessModulator.setBrightness(mScreenBrightness);
if ((mDirty & (DIRTY_BRIGHTNESS | DIRTY_SCREEN_ON)) != 0) {
mScreenBrightnessModulator.setBrightness(mScreenOn ? mScreenBrightness : 0);
}
if ((mDirty & DIRTY_SCREEN_ON) != 0 && mScreenOn) {