Loading core/java/android/os/IPowerManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -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); } core/java/android/os/PowerManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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. Loading core/res/res/values/lineage_config.xml +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. Loading @@ -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> Loading core/res/res/values/lineage_symbols.xml +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. Loading @@ -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" /> Loading services/core/java/com/android/server/display/DisplayPowerController.java +4 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
core/java/android/os/IPowerManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -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); }
core/java/android/os/PowerManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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. Loading
core/res/res/values/lineage_config.xml +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. Loading @@ -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> Loading
core/res/res/values/lineage_symbols.xml +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. Loading @@ -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" /> Loading
services/core/java/com/android/server/display/DisplayPowerController.java +4 −1 Original line number Diff line number Diff line Loading @@ -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