From 4aad455280dd19a3097e8fad3f68bfee1de30327 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Tue, 28 Jun 2016 13:16:15 -0700 Subject: [PATCH] Notification icons: Correctly apply color filter for DrawableContainers Change-Id: I3d101c717c414786817c2139ed68a8ee3fd09241 Fixes: 29824236 --- .../notification/NotificationHeaderViewWrapper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java index 7794d5ba9a0f9..3e4c75897d69e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHeaderViewWrapper.java @@ -240,7 +240,11 @@ public class NotificationHeaderViewWrapper extends NotificationViewWrapper { // Also, the notification might have been modified during the animation, so background // might be null here. if (iconDrawable != null) { - iconDrawable.mutate().setColorFilter(mIconColorFilter); + Drawable d = iconDrawable.mutate(); + // DrawableContainer ignores the color filter if it's already set, so clear it first to + // get it set and invalidated properly. + d.setColorFilter(null); + d.setColorFilter(mIconColorFilter); } }