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

Commit 1596b659 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Fix ambient color resolution

resolveColor() now considers that black backgrounds should have
monochromatic icons. Ambient style is an exception because we
do want colors in there.

Change-Id: Ia21202bb354babb77013feda67c313323ec1e070
Fixes: 115887386
Test: visual
parent 8750eebf
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -523,8 +523,9 @@ public class ContrastColorUtil {
    }

    public static int resolveAmbientColor(Context context, int notificationColor) {
        final int resolvedColor = resolveColor(context, notificationColor,
                true /* defaultBackgroundIsDark */);
        final int resolvedColor = notificationColor == Notification.COLOR_DEFAULT
                ? context.getColor(com.android.internal.R.color.notification_default_color_dark)
                : notificationColor;

        int color = resolvedColor;
        color = ContrastColorUtil.ensureTextContrastOnBlack(color);