aboutsummaryrefslogtreecommitdiffstats
path: root/lineage
diff options
context:
space:
mode:
authorSam Mortimer <sam@mortimer.me.uk>2018-05-26 18:02:55 -0700
committerSam Mortimer <sam@mortimer.me.uk>2018-06-05 20:26:52 +0200
commite703ff0a0b7d9b9b14781c0ae328f284857082e1 (patch)
tree7a5fa96d9160917423d11416f04fc7ec7f169f40 /lineage
parent506bef406ee210329f82dc1b4269bdd9e5266eed (diff)
downloadlineage-sdk-e703ff0a0b7d9b9b14781c0ae328f284857082e1.tar.gz
lineage-sdk-e703ff0a0b7d9b9b14781c0ae328f284857082e1.tar.bz2
lineage-sdk-e703ff0a0b7d9b9b14781c0ae328f284857082e1.zip
Add led capability LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS
*) Many existing liblights support notification brightness control via the alpha channel but do not support similar for the battery led. *) https://github.com/LineageOS/android_lineage-sdk/commit/8f7a4559ab4a81855f399eae32ebe4a3f531e8b2 introduced a dependency on light capability LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS such that, when set, it was assumed that the battery led brightness is also liblights adjustable. It turned out that this was not the case. *) Create a new capability to allow devices to distinguish whether their liblights supports adjustable brightness control for notification and battery leds independently of one another. *) Document how brightness support works in LightsCapabilities. *) Copy LightsCapabilities comments to the default lights config to raise visibility. Change-Id: Id95905f07128c78c6acacf3b60d71bb37f70bcfb
Diffstat (limited to 'lineage')
-rw-r--r--lineage/res/res/values/config.xml27
1 files changed, 27 insertions, 0 deletions
diff --git a/lineage/res/res/values/config.xml b/lineage/res/res/values/config.xml
index 83075099..32257b25 100644
--- a/lineage/res/res/values/config.xml
+++ b/lineage/res/res/values/config.xml
@@ -60,14 +60,41 @@
This integer should equal the sum of the corresponding value for each
of the following capabilities present:
+ // Device has a color adjustable battery light.
LIGHTS_RGB_NOTIFICATION_LED = 1
+
+ // Device has a color adjustable notification light.
LIGHTS_RGB_BATTERY_LED = 2
+
LIGHTS_MULTIPLE_NOTIFICATION_LED = 4 (deprecated)
+
+ // The notification light has adjustable pulsing capability.
LIGHTS_PULSATING_LED = 8
+
+ // Device has a multi-segment battery light that is able to
+ // use the light brightness value to determine how many
+ // segments to show (in order to represent battery level).
LIGHTS_SEGMENTED_BATTERY_LED = 16
+
+ // The notification light supports HAL adjustable brightness
+ // via the alpha channel.
+ // Note: if a device notification light supports LIGHTS_RGB_NOTIFICATION_LED
+ // then HAL support is not necessary for brightness control. In this case,
+ // brightness support will be provided by lineage-sdk through the scaling of
+ // RGB color values.
LIGHTS_ADJUSTABLE_NOTIFICATION_LED_BRIGHTNESS = 32
+
+ // Device has a battery light.
LIGHTS_BATTERY_LED = 64
+ // The battery light supports HAL adjustable brightness via
+ // the alpha channel.
+ // Note: if a device battery light supports LIGHTS_RGB_BATTERY_LED then HAL
+ // support is not necessary for brightness control. In this case,
+ // brightness support will be provided by lineage-sdk through the scaling of
+ // RGB color values.
+ LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS = 128
+
For example, a device with notification and battery lights that supports
pulsating and RGB control would set this config to 75. -->
<integer name="config_deviceLightCapabilities">8</integer>