aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvvanVG <ivvangrigo@gmail.com>2019-02-06 00:10:40 +0800
committerDavide Garberi <dade.garberi@gmail.com>2019-03-04 22:12:59 +0100
commitc91c7bd7d77693526e528ba582670b9ca3491566 (patch)
tree8c59f4e53bafc989d5074d4412d8ddb76fbc7557
parentc973f8c2e817bb0df8feecb1a7e02699fd4b8d09 (diff)
z2_plus: overlay: Add light capabilities
* Set config_deviceLightCapabilities to 232: 8+32+64+128=232 is the correct value for z2_plus * The device does not have a color LED, so the RGB bits are not counted Change-Id: I00a45ddaab9ddacc300426f4bea7be88b8575032
-rwxr-xr-xdevice.mk4
-rw-r--r--overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml49
2 files changed, 52 insertions, 1 deletions
diff --git a/device.mk b/device.mk
index 02d2f33..4bad39b 100755
--- a/device.mk
+++ b/device.mk
@@ -32,7 +32,9 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/mixer_paths_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml
# Overlays
-DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
+DEVICE_PACKAGE_OVERLAYS += \
+ $(LOCAL_PATH)/overlay \
+ $(LOCAL_PATH)/overlay-lineage
# Vendor properties
-include $(LOCAL_PATH)/vendor_prop.mk
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
new file mode 100644
index 0000000..09565b3
--- /dev/null
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod Project
+ 2017-2018 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.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <!-- All the capabilities of the LEDs on this device, stored as a bit field.
+ This integer should equal the sum of the corresponding value for each
+ of the following capabilities present:
+ // Device has a color adjustable notification light.
+ LIGHTS_RGB_NOTIFICATION_LED = 1
+ // Device has a color adjustable battery 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">232</integer>
+</resources>