raphael: Set light capabilities

- LIGHTS_ADJUSTABLE_NOTIFICATION_LED_BRIGHTNESS (32)
- LIGHTS_BATTERY_LED (64)
- LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS (128)
- LIGHTS_BREATHING_LED (256)

Change-Id: Ibf3b7cb9678947d9e4b5ac6f50dfe2d3b9d5e706
This commit is contained in:
armdebug
2025-06-13 06:53:09 -04:00
parent 74e3083cc5
commit 6f900aa4f9
4 changed files with 77 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
ApertureOverlayDevice \
FrameworkResOverlayDevice \
LineageSDKOverlayDevice \
LineageSystemUIOverlayDevice \
SettingsOverlayDevice \
SystemUIOverlayDevice

View File

@@ -0,0 +1,9 @@
//
// SPDX-FileCopyrightText: The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
runtime_resource_overlay {
name: "LineageSDKOverlayDevice",
vendor: true,
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="lineageos.platform.overlay.device">
<overlay
android:isStatic="true"
android:priority="250"
android:targetPackage="lineageos.platform" />
</manifest>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: 2015 The CyanogenMod Project
SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<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
// The notification light has non-adjustable pulsing capability.
LIGHTS_BREATHING_LED = 256
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">480</integer>
</resources>