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

Commit e7bc4f5e authored by Joe Onorato's avatar Joe Onorato Committed by Android Git Automerger
Browse files

am a1e74744: am 11e2e9b0: Merge "Don\'t turn the button backlights on if the...

am a1e74744: am 11e2e9b0: Merge "Don\'t turn the button backlights on if the screen is off. Part 2." into gingerbread
parents dcaff67a a1e74744
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;