diff options
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(); } |