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

Commit 6d44447d authored by nadlabak's avatar nadlabak Committed by Pawit Pornkitprasan
Browse files

Bring back LCD disable brightness decrease

This reverts commit 5a63233c
and b1b664a2

Patch Set 2: Do not change default LIGHT_DECREASE setting

Change-Id: I17616d17c86a2954d5c530c356b0541af5664ad5
parent 98ddd3ed
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2699,7 +2699,12 @@ public class PowerManagerService extends IPowerManager.Stub
        if (mLightSensorValue != value) {
            mLightSensorValue = value;
            if ((mPowerState & BATTERY_LOW_BIT) == 0) {
                int lcdValue = getAutoBrightnessValue(value, mLastLcdValue,
                // use maximum light sensor value seen since screen went on for LCD to avoid flicker
                // we only do this if we are undocked, since lighting should be stable when
                // stationary in a dock.
                int lcdValue = getAutoBrightnessValue(
                        (mIsDocked ? value : mHighestLightSensorValue),
                        mLastLcdValue,
                        (mCustomLightEnabled ? mCustomLightLevels : mAutoBrightnessLevels),
                        (mCustomLightEnabled ? mCustomLcdValues : mLcdBacklightValues));