Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 166f6b96 authored by Steve Kondik's avatar Steve Kondik
Browse files

Revert "Triggering EarlySuspend based on BackLight brightness"

This reverts commit 7993d740.
parent 63b6611f
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -2381,14 +2381,6 @@ public class PowerManagerService extends IPowerManager.Stub
                    Message msg = mScreenBrightnessHandler
                            .obtainMessage(ANIMATE_LIGHTS, mask, newValue);
                    mScreenBrightnessHandler.sendMessageDelayed(msg, delay);
                } else {
                    final boolean doScreenAnimation = (mask & (SCREEN_BRIGHT_BIT | SCREEN_ON_BIT)) != 0;
                    final boolean turnOff = currentValue == PowerManager.BRIGHTNESS_OFF;
                    if (turnOff && doScreenAnimation) {
                        // Cancel all pending animations since we're turning off
                        mScreenBrightnessHandler.removeCallbacksAndMessages(null);
                        screenOffFinishedAnimatingLocked(mScreenOffReason);
                    }
                }
            }
        }
@@ -2452,6 +2444,9 @@ public class PowerManagerService extends IPowerManager.Stub
                    final boolean doScreenAnim = (mask & (SCREEN_BRIGHT_BIT | SCREEN_ON_BIT)) != 0;
                    final boolean turningOff = endValue == PowerManager.BRIGHTNESS_OFF;
                    if (turningOff && doScreenAnim) {
                        // Cancel all pending animations since we're turning off
                        mScreenBrightnessHandler.removeCallbacksAndMessages(null);
                        screenOffFinishedAnimatingLocked(mScreenOffReason);
                        duration = 200; // TODO: how long should this be?
                    }
                    if (doScreenAnim) {