Separate configuration of auto-brightness for button/keyboard backlights.
Presently, light-sensor based automatic brightness (config_autoBrightnessLevels) controls both button and keyboard backlights in addition to the screen backlight. Unfortunately auto-brightness for button/keyboard backlights doesn't work well on devices (e.g., epicmtd) with neither (i) dimmable button/keyboard backlights (so when they're on, they're very bright even if the screen backlight is relatively dark) nor (ii) identifiable surface features on capacitive buttons (so they can't be found if the backlights are permanently turned off). For these devices, the non-auto-brightness behavior of button/keyboard backlights, whereby they turn on during screen-on events and user activity and timeout-to-off shortly thereafter, is preferable. Thus, this commit adds a config option, config_autoBrightnessButtonKeyboard (defaults to true), that when disabled allows for automatic brightness control of the screen backlight, but retains the timeout-based behavior for button and keyboard backlights. Also addressed is a bug that disables the button and keyboard backlights on screen unlock, and reenables the backlights on touch events so that capacitive keys may be located. Additional fixes for button/keyboard backlight auto-brightness. - Use sensor-determined brightness values when the button and/or keyboard lights are on, even if button/keyboard auto-brightness is disabled, since users may want to specify a custom brightness setting that disables the button/keyboard backlight entirely in low-ambient light situations. - When button/keyboard auto-brightness is disabled, don't update button and keyboard brightnesses immediately if ambient light (the sensor) changes, as this may reactivate these lights after they've turned off in absense of user activity. This is a particular problem when watching video or other circumstances when the lights are not expected to reactivate. Change-Id: Idb26aa907ce4b04fb1f52a884e4e5bcb40fe695f
Loading
Please register or sign in to comment