From 4f25624502cc19e352c8f2cfc2d62789deb16c84 Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Fri, 5 Mar 2021 16:59:22 -0500 Subject: [PATCH] Default colored notifications use accent color for icon; System notifications use default color. Bug: 181048615 Test: visual inspection Change-Id: I98697dbcefb50256b0ac5e7a0a9a64a76681d3ec --- core/java/android/app/Notification.java | 3 +++ core/res/res/values/colors.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index bc24e9767944d..249991f778c59 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -6270,6 +6270,9 @@ public class Notification implements Parcelable if (rawColor == COLOR_DEFAULT) { ensureColors(p); color = ContrastColorUtil.resolveDefaultColor(mContext, background, mInNightMode); + if (mTintWithThemeAccent) { + color = obtainThemeColor(R.attr.colorAccent, color); + } } else { color = ContrastColorUtil.resolveContrastColor(mContext, rawColor, background, mInNightMode); diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml index d79c01faaa366..abaf54f38a1ae 100644 --- a/core/res/res/values/colors.xml +++ b/core/res/res/values/colors.xml @@ -171,7 +171,7 @@ #bf39b500 #4dffeb3b - #ff607D8B + #00000000 #ff00bcd4