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

Commit 10ee1fcf authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Bring back notification lights and sanitized color.

buildUnstyled() was doing more than I noticed in
I81f8ffed0eb76084b2f2b25b97e325858f0a1d05.

Change-Id: I2109fc0d5bae692676b0ca72ff5048f0a3037375
parent 8382f98f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2599,6 +2599,12 @@ public class Notification implements Parcelable
            mN.ledARGB = argb;
            mN.ledOnMS = onMs;
            mN.ledOffMS = offMs;
            if (onMs != 0 || offMs != 0) {
                mN.flags |= FLAG_SHOW_LIGHTS;
            }
            if ((mN.defaults & DEFAULT_LIGHTS) != 0) {
                mN.flags |= FLAG_SHOW_LIGHTS;
            }
            return this;
        }

@@ -2951,6 +2957,7 @@ public class Notification implements Parcelable
         */
        public Builder setColor(@ColorInt int argb) {
            mN.color = argb;
            sanitizeColor();
            return this;
        }

@@ -3419,11 +3426,10 @@ public class Notification implements Parcelable
            }
        }

        private int sanitizeColor() {
        private void sanitizeColor() {
            if (mN.color != COLOR_DEFAULT) {
                mN.color |= 0xFF000000; // no alpha for custom colors
            }
            return mN.color;
        }

        private int resolveColor() {