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

Commit 11e2e9b0 authored by Joe Onorato's avatar Joe Onorato Committed by Android (Google) Code Review
Browse files

Merge "Don't turn the button backlights on if the screen is off. Part 2." into gingerbread

parents 3d40cd50 06eb33ac
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2354,6 +2354,14 @@ class PowerManagerService extends IPowerManager.Stub
            Slog.d(TAG, "lightSensorChangedLocked " + value);
        }

        // Don't do anything if the screen is off.
        if ((mPowerState & SCREEN_ON_BIT) == 0) {
            if (mDebugLightSensor) {
                Slog.d(TAG, "dropping lightSensorChangedLocked because screen is off");
            }
            return;
        }

        // do not allow light sensor value to decrease
        if (mHighestLightSensorValue < value) {
            mHighestLightSensorValue = value;