OSDN Git Service

Ambient Display: Fix race with coloring and redaction
authorAdrian Roos <roosa@google.com>
Mon, 19 Dec 2016 22:26:51 +0000 (14:26 -0800)
committerAdrian Roos <roosa@google.com>
Tue, 20 Dec 2016 20:17:36 +0000 (20:17 +0000)
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.

packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java

index caf5447..c19dc22 100644 (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;
     }