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

Commit d7ba82d1 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Bring back notification lights and sanitized color."

parents 8944b692 10ee1fcf
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() {