Skip to content

Commit 356bd4c

Browse files
author
Jeff Brown
committed
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
1 parent 8a6f6a8 commit 356bd4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/java/com/android/server/power/DisplayPowerState.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ private void invokeCleanListenerIfNeeded() {
302302
public void run() {
303303
mScreenUpdatePending = false;
304304

305-
if (mPhotonicModulator.setState(mScreenOn,
306-
mScreenOn ? (int)(mScreenBrightness * mElectronBeamLevel) : 0)) {
305+
int brightness = mScreenOn && mElectronBeamLevel > 0f ? mScreenBrightness : 0;
306+
if (mPhotonicModulator.setState(mScreenOn, brightness)) {
307307
mScreenReady = true;
308308
invokeCleanListenerIfNeeded();
309309
}

0 commit comments

Comments
 (0)