Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;