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

Commit ce8aef1f authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-17.1' into v1-q

parents 5fa5cd15 7d049fdd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ interface IPowerManager
    boolean forceSuspend();

    // Lineage custom API
    void setKeyboardVisibility(boolean visible);
    void wakeUpWithProximityCheck(long time, int reason, String details, String opPackageName);
    void rebootCustom(boolean confirm, String reason, boolean wait);
}
+21 −0
Original line number Diff line number Diff line
@@ -883,6 +883,15 @@ public final class PowerManager {
                com.android.internal.R.integer.config_buttonBrightnessSettingDefault);
    }

    /**
     * Gets the default keyboard brightness value.
     * @hide
     */
    public int getDefaultKeyboardBrightness() {
        return mContext.getResources().getInteger(
                com.android.internal.R.integer.config_keyboardBrightnessSettingDefault);
    }

    /**
     * Creates a new wake lock with the specified level and flags.
     * <p>
@@ -1908,6 +1917,18 @@ public final class PowerManager {
        }
    }

    /**
     * @hide
     */
    public void setKeyboardVisibility(boolean visible) {
        try {
            if (mService != null) {
                mService.setKeyboardVisibility(visible);
            }
        } catch (RemoteException e) {
        }
    }

    /**
     * If true, the doze component is not started until after the screen has been
     * turned off and the screen off animation has been performed.
+4 −2
Original line number Diff line number Diff line
<!--
     Copyright (C) 2012-2015 The CyanogenMod Project
     Copyright (C) 2017-2019 The LineageOS Project
     Copyright (C) 2017-2020 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -15,9 +15,11 @@
     limitations under the License.
-->
<resources>
    <!-- Button backlight -->
    <!-- Button and keyboard backlight -->
    <integer name="config_buttonBrightnessSettingDefault">255</integer>
    <integer name="config_keyboardBrightnessSettingDefault">0</integer>
    <bool name="config_deviceHasVariableButtonBrightness">false</bool>
    <bool name="config_deviceHasVariableKeyboardBrightness">false</bool>

    <!-- Whether to allow process with media UID to access CameraServiceProxy -->
    <bool name="config_allowMediaUidForCameraServiceProxy">false</bool>
+4 −2
Original line number Diff line number Diff line
<!--
     Copyright (C) 2012-2015 The CyanogenMod Project
     Copyright (C) 2017-2019 The LineageOS Project
     Copyright (C) 2017-2020 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -20,9 +20,11 @@
    <java-symbol type="string" name="adb_both_active_notification_title" />
    <java-symbol type="string" name="adb_active_generic_notification_message" />

    <!-- Button backlight -->
    <!-- Button and keyboard backlight -->
    <java-symbol type="integer" name="config_buttonBrightnessSettingDefault" />
    <java-symbol type="integer" name="config_keyboardBrightnessSettingDefault" />
    <java-symbol type="bool" name="config_deviceHasVariableButtonBrightness" />
    <java-symbol type="bool" name="config_deviceHasVariableKeyboardBrightness" />

    <!-- Whether to allow process with media UID to access CameraServiceProxy -->
    <java-symbol type="bool" name="config_allowMediaUidForCameraServiceProxy" />
+4 −1
Original line number Diff line number Diff line
@@ -856,12 +856,15 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
            brightness = PowerManager.BRIGHTNESS_OFF;
            mBrightnessReasonTemp.setReason(BrightnessReason.REASON_SCREEN_OFF);
            mLights.getLight(LightsManager.LIGHT_ID_BUTTONS).setBrightness(brightness);
            mLights.getLight(LightsManager.LIGHT_ID_KEYBOARD).setBrightness(brightness);
        }

        // Disable button lights when dozing
        // Disable button and keyboard lights when dozing
        if (state == Display.STATE_DOZE || state == Display.STATE_DOZE_SUSPEND) {
            mLights.getLight(LightsManager.LIGHT_ID_BUTTONS)
                    .setBrightness(PowerManager.BRIGHTNESS_OFF);
            mLights.getLight(LightsManager.LIGHT_ID_KEYBOARD)
                    .setBrightness(PowerManager.BRIGHTNESS_OFF);
        }

        // Always use the VR brightness when in the VR state.
Loading