From a7c69637f8fa7cc8c0e7ac7c4d73659730315841 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 7 Jun 2017 15:51:29 -0700 Subject: [PATCH] Fixed an issue where the icons had the wrong color The color of the icons was taken from the ambient view and wasn't updated when dark changed. Change-Id: I472e76ff9d4d92500faae5517f10bdeb2658936d Fixes: 62423352 Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java --- .../systemui/statusbar/ExpandableNotificationRow.java | 1 + .../systemui/statusbar/ExpandableNotificationRowTest.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 6fb5d6b8a335e..1c1be989b5304 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -1395,6 +1395,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView if (mIsSummaryWithChildren) { mChildrenContainer.setDark(dark, fade, delay); } + updateShelfIconColor(); } public boolean isExpandable() { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java index d44f845478618..2e547e111bb82 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java @@ -95,4 +95,11 @@ public class ExpandableNotificationRowTest extends SysuiTestCase { row.setHideSensitive(true, false, 0, 0); verify(row).updateShelfIconColor(); } + + @Test + public void testIconColorShouldBeUpdatedWhenSettingDark() throws Exception { + ExpandableNotificationRow row = spy(mNotificationTestHelper.createRow()); + row.setDark(true, false, 0); + verify(row).updateShelfIconColor(); + } }