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.
This commit is contained in:
Adrian Roos
2016-12-19 14:26:51 -08:00
parent 52a9e0e1dd
commit e5726a2082

View File

@@ -1346,6 +1346,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
NotificationContentView showingLayout = getShowingLayout();
showingLayout.updateBackgroundColor(animated);
mPrivateLayout.updateExpandButtons(isExpandable());
showingLayout.setDark(isDark(), false /* animate */, 0 /* delay */);
mShowingPublicInitialized = true;
}