aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2019-02-01 11:50:02 +0100
committerLuK1337 <priv.luk@gmail.com>2019-02-01 11:50:02 +0100
commitcc88abcdc221e6ae304c07583dd4fa31de3b196a (patch)
treec4c2387bb57bde9412887f614dd324a533652ee7
parentdca97f34fae3d3244960a023bf86f49885fb9ea1 (diff)
enchilada: Add notification LED related overlays
Change-Id: I229b626136cc7c63f83436cd3cd1ba0e960a945e
-rw-r--r--device.mk3
-rw-r--r--overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml61
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml3
3 files changed, 66 insertions, 1 deletions
diff --git a/device.mk b/device.mk
index ed1b856..d3308d1 100644
--- a/device.mk
+++ b/device.mk
@@ -26,7 +26,8 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_o_mr1.mk
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
- $(LOCAL_PATH)/overlay
+ $(LOCAL_PATH)/overlay \
+ $(LOCAL_PATH)/overlay-lineage
# Device uses high-density artwork where available
PRODUCT_AAPT_CONFIG := normal
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..a0119c3
--- /dev/null
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015-2016 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 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">107</integer>
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index c3688a2..8d43ce7 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -388,4 +388,7 @@
<!-- Height of the status bar -->
<dimen name="status_bar_height_portrait">80px</dimen>
<dimen name="status_bar_height_landscape">80px</dimen>
+
+ <!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
+ <bool name="config_intrusiveNotificationLed">true</bool>
</resources>