diff options
| author | 2018-09-24 14:33:05 -0700 | |
|---|---|---|
| committer | 2018-09-24 14:40:23 -0700 | |
| commit | 1596b659f423665861c973a64bd99e9df72b2c20 (patch) | |
| tree | d182d4c73375c076e17c293619b7b7d3368014f5 | |
| parent | 8750eebfe2ece32f2ed7d8547ac14d464f5de147 (diff) | |
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
| -rw-r--r-- | core/java/com/android/internal/util/ContrastColorUtil.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/com/android/internal/util/ContrastColorUtil.java b/core/java/com/android/internal/util/ContrastColorUtil.java index 1038199cf109..a403c068c7c4 100644 --- a/core/java/com/android/internal/util/ContrastColorUtil.java +++ b/core/java/com/android/internal/util/ContrastColorUtil.java @@ -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); |