Commit 415e8de0 authored by Luca Stefani's avatar Luca Stefani Committed by Sam Mortimer

fw/b lights: Allow black notification color

* Color 0 is used to mean "lineage-sdk should pick a default"

* Explictly requesting black made the led blue (eg lineageparts light picker), fix that

Change-Id: Ia03f898c1b6cd0f77af8bb155139b587664f47af
parent 379859e9
......@@ -218,6 +218,11 @@ public final class NotificationRecord {
if ((notification.defaults & Notification.DEFAULT_LIGHTS) != 0) {
light = new Light(defaultLightColor, defaultLightOn,
defaultLightOff);
} else if (light.color == 0) {
// User has requested color 0. However, lineage-sdk interprets
// color 0 as "supply a default" therefore adjust alpha to make
// the color still black but non-zero.
light = new Light(0x01000000, light.onMs, light.offMs);
}
} else {
light = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment