OSDN Git Service

Fixed an issue where the icons had the wrong color
authorSelim Cinek <cinek@google.com>
Wed, 7 Jun 2017 22:51:29 +0000 (15:51 -0700)
committerIan Pedowitz <ijpedowitz@google.com>
Thu, 8 Jun 2017 02:51:04 +0000 (19:51 -0700)
The color of the icons was taken from the ambient view
and wasn't updated when dark changed.

(cherry picked from commit a7c69637f8fa7cc8c0e7ac7c4d73659730315841)

Change-Id: I558447f282bb54f13be1622c3f2528a383fbc3b7
Fixes: 62423352
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java

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

index bf6db23..9402c5f 100644 (file)
@@ -1451,6 +1451,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
         if (mIsSummaryWithChildren) {
             mChildrenContainer.setDark(dark, fade, delay);
         }
+        updateShelfIconColor();
     }
 
     public boolean isExpandable() {
index 2d46537..664ea71 100644 (file)
@@ -99,6 +99,13 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
     }
 
     @Test
+    public void testIconColorShouldBeUpdatedWhenSettingDark() throws Exception {
+        ExpandableNotificationRow row = spy(mNotificationTestHelper.createRow());
+        row.setDark(true, false, 0);
+        verify(row).updateShelfIconColor();
+    }
+
+    @Test
     public void testAboveShelfChangedListenerCalled() throws Exception {
         ExpandableNotificationRow row = mNotificationTestHelper.createRow();
         AboveShelfChangedListener listener = mock(AboveShelfChangedListener.class);