Ambient Display: Fix race with coloring and redaction
Fixes a bug that could result in a notification being colored on
ambient display when redaction is enabled.
Only the showing layout (either redacted or regular) was be set to
dark. If the showing layout changed after the darkness changed, the
newly showing layout was not properly darkened.
Change-Id: I0930ebe8007634ee92e104573294b5c27f1bad82
Fixes: 33429653
Test: Enable redacted notificationsn on lockscreen, enter ambient, verify that notifications are gray.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index caf5447..c19dc22 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -1346,6 +1346,7 @@
NotificationContentView showingLayout = getShowingLayout();
showingLayout.updateBackgroundColor(animated);
mPrivateLayout.updateExpandButtons(isExpandable());
+ showingLayout.setDark(isDark(), false /* animate */, 0 /* delay */);
mShowingPublicInitialized = true;
}