Fixed a bug where legacy icons where incorrectly colored
Because we were unconditionally applying the color when
set to dark
Change-Id: I4321a81fcd0f04f921752a5dcb8c3cbd47af36b7
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java
index 36f5eb3..fb0a419 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java
@@ -135,12 +135,22 @@
}
}
if (mIcon != null) {
+ boolean hadColorFilter = mNotificationHeader.getOriginalIconColor()
+ != NotificationHeaderView.NO_COLOR;
if (fade) {
- fadeIconColorFilter(mIcon, dark, delay);
- fadeIconAlpha(mIcon, dark, delay);
+ if (hadColorFilter) {
+ fadeIconColorFilter(mIcon, dark, delay);
+ fadeIconAlpha(mIcon, dark, delay);
+ } else {
+ fadeGrayscale(mIcon, dark, delay);
+ }
} else {
- updateIconColorFilter(mIcon, dark);
- updateIconAlpha(mIcon, dark);
+ if (hadColorFilter) {
+ updateIconColorFilter(mIcon, dark);
+ updateIconAlpha(mIcon, dark);
+ } else {
+ updateGrayscale(mIcon, dark);
+ }
}
}
setPictureGrayscale(dark, fade, delay);