From d3c99323125106eab7d9649f7238754df706e90f Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Thu, 27 Sep 2018 10:22:29 -0700 Subject: [PATCH] No color spans in notifications when night mode Apps might use color spans to express hierarchy in their notifications but they aren't really tuned for dark mode. This may cause compatibility issues with Q. Test: visual Change-Id: Ia7e2a29907f29c4142dc7c873354d16d247ae069 Fixes: 115813048 --- core/java/android/app/Notification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 3638bc48d2b53..81df447816d18 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -4440,7 +4440,7 @@ public class Notification implements Parcelable } private CharSequence processTextSpans(CharSequence text) { - if (hasForegroundColor()) { + if (hasForegroundColor() || mInNightMode) { return ContrastColorUtil.clearColorSpans(text); } return text;