diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-10-26 18:22:56 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-10-26 18:44:51 -0700 |
commit | 356bd4cf2c6db38c61c79e81fd5d9d119d299b8d (patch) | |
tree | fe9d373b276c560c21d9da40b2aa9510584a6ac7 /services | |
parent | 8a6f6a8ca9824891cc841d8c6ebd72a74c7d2580 (diff) | |
download | frameworks_base-356bd4cf2c6db38c61c79e81fd5d9d119d299b8d.zip frameworks_base-356bd4cf2c6db38c61c79e81fd5d9d119d299b8d.tar.gz frameworks_base-356bd4cf2c6db38c61c79e81fd5d9d119d299b8d.tar.bz2 |
Don't scale screen brightness by electron beam level.
This change removes the modulation of the screen brightness
by the electron beam level. The screen brightness remains
constant while the electron beam animation is playing.
Previously we were multiplying the screen brightness by the
electron beam level so as to animate both at the same time.
The problem is that when the screen brightness is already dim
to begin with, it may not be possible to see the electron beam
animation because the modulated screen brightness rapidly
converges on 0. This may manifest give the appearance of
an abrupt transition or a flash as the screen turns off.
Bug: 7387800
Change-Id: I27b90f0098bbdc3de1d66fad819548d1301405cd
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/power/DisplayPowerState.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/power/DisplayPowerState.java b/services/java/com/android/server/power/DisplayPowerState.java index 6bb7ec5..fa318f8 100644 --- a/services/java/com/android/server/power/DisplayPowerState.java +++ b/services/java/com/android/server/power/DisplayPowerState.java @@ -302,8 +302,8 @@ final class DisplayPowerState { public void run() { mScreenUpdatePending = false; - if (mPhotonicModulator.setState(mScreenOn, - mScreenOn ? (int)(mScreenBrightness * mElectronBeamLevel) : 0)) { + int brightness = mScreenOn && mElectronBeamLevel > 0f ? mScreenBrightness : 0; + if (mPhotonicModulator.setState(mScreenOn, brightness)) { mScreenReady = true; invokeCleanListenerIfNeeded(); } |