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

Unverified Commit ab575b34 authored by Michael Bestas's avatar Michael Bestas
Browse files

fixup! fwb: Re-introduce keyboard backlight brightness control

Change-Id: I9e674eb3fe8b97ef60375a741e130d5c56e82d59
parent 3a0286d1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1397,13 +1397,17 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        final boolean userSetBrightnessChanged = mDisplayBrightnessController
                .updateUserSetScreenBrightness();

        // Disable button lights when screen off or dozing
        // Disable button and keyboard lights when screen off or dozing
        if (state == Display.STATE_OFF || state == Display.STATE_DOZE ||
                state == Display.STATE_DOZE_SUSPEND) {
            LogicalLight buttonsLight = mLights.getLight(LightsManager.LIGHT_ID_BUTTONS);
            if (buttonsLight != null) {
                buttonsLight.setBrightness(PowerManager.BRIGHTNESS_OFF_FLOAT);
            }
            LogicalLight keyboardLight = mLights.getLight(LightsManager.LIGHT_ID_KEYBOARD);
            if (keyboardLight != null) {
                keyboardLight.setBrightness(PowerManager.BRIGHTNESS_OFF_FLOAT);
            }
        }

        DisplayBrightnessState displayBrightnessState = mDisplayBrightnessController