summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Martins <bgcngm@gmail.com>2020-10-07 14:40:19 +0100
committerBruno Martins <bgcngm@gmail.com>2020-10-29 14:16:18 +0000
commit13069beb3adcbc5c3ad483c8a95c390fa22e31d4 (patch)
treeef031b6c09680c74f19268485e421fc38047edfc
parent88daa87a94c63abc790d5fe04f442d1916d0fe45 (diff)
sdk: Move to new button and keyboard brightness configs
For as strange as it may be, so far the visibility of the features depended on the default value of config_{button,keyboard}BrightnessSettingDefaultFloat. This was nonsense, because it would force everyone to overlay that default with a value of 0.0, just to make the unsupported feature go away. Change-Id: If605238bf30642db057b06b03224d9a8b4451f12
-rw-r--r--lineage/res/res/values/config.xml14
-rw-r--r--lineage/res/res/values/symbols.xml3
2 files changed, 14 insertions, 3 deletions
diff --git a/lineage/res/res/values/config.xml b/lineage/res/res/values/config.xml
index 93cde55e..cccc7b80 100644
--- a/lineage/res/res/values/config.xml
+++ b/lineage/res/res/values/config.xml
@@ -248,9 +248,19 @@
before setting power profiles on boot. -->
<bool name="config_waitForMpctlOnBoot">false</bool>
- <!-- Button and keyboard backlight -->
- <bool name="config_deviceHasVariableButtonBrightness">false</bool>
+ <!-- Button backlight control. Possible values are:
+ 0 - Not supported
+ 1 - Supported, but only on/off mode
+ 2 - Supported with variable brightness control
+ -->
+ <integer name="config_deviceSupportsButtonBrightnessControl">0</integer>
<dimen name="config_buttonBrightnessSettingDefaultFloat">1.0</dimen>
+
+ <!-- Keyboard backlight control. Possible values are:
+ 0 - Not supported
+ 1 - Supported with variable brightness control
+ -->
+ <integer name="config_deviceSupportsKeyboardBrightnessControl">0</integer>
<dimen name="config_keyboardBrightnessSettingDefaultFloat">1.0</dimen>
<!-- Whether to cleanup fingerprints upon connection to the daemon and when
diff --git a/lineage/res/res/values/symbols.xml b/lineage/res/res/values/symbols.xml
index be6f10f3..6bae7c27 100644
--- a/lineage/res/res/values/symbols.xml
+++ b/lineage/res/res/values/symbols.xml
@@ -172,7 +172,8 @@
<java-symbol type="bool" name="config_haveNotch" />
<!-- Button and keyboard backlight -->
- <java-symbol type="bool" name="config_deviceHasVariableButtonBrightness" />
+ <java-symbol type="integer" name="config_deviceSupportsButtonBrightnessControl" />
+ <java-symbol type="integer" name="config_deviceSupportsKeyboardBrightnessControl" />
<java-symbol type="dimen" name="config_buttonBrightnessSettingDefaultFloat" />
<java-symbol type="dimen" name="config_keyboardBrightnessSettingDefaultFloat" />