OSDN Git Service

resolve merge conflicts of 695f21a66189 to oc-dr1-dev
authorIan Pedowitz <ijpedowitz@google.com>
Thu, 8 Jun 2017 00:47:38 +0000 (17:47 -0700)
committerIan Pedowitz <ijpedowitz@google.com>
Thu, 8 Jun 2017 02:52:10 +0000 (19:52 -0700)
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ifeffa55c7fb80b0f327ecc5b50cefeca9db6457b
Merged-In: I558447f282bb54f13be1622c3f2528a383fbc3b7

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

@@@ -99,38 -97,9 +99,45 @@@ public class ExpandableNotificationRowT
      }
  
      @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);
 +        row.setAboveShelfChangedListener(listener);
 +        row.setHeadsUp(true);
 +        verify(listener).onAboveShelfStateChanged(true);
 +    }
 +
 +    @Test
 +    public void testAboveShelfChangedListenerCalledPinned() throws Exception {
 +        ExpandableNotificationRow row = mNotificationTestHelper.createRow();
 +        AboveShelfChangedListener listener = mock(AboveShelfChangedListener.class);
 +        row.setAboveShelfChangedListener(listener);
 +        row.setPinned(true);
 +        verify(listener).onAboveShelfStateChanged(true);
 +    }
 +
 +    @Test
 +    public void testAboveShelfChangedListenerCalledHeadsUpGoingAway() throws Exception {
 +        ExpandableNotificationRow row = mNotificationTestHelper.createRow();
 +        AboveShelfChangedListener listener = mock(AboveShelfChangedListener.class);
 +        row.setAboveShelfChangedListener(listener);
 +        row.setHeadsUpAnimatingAway(true);
 +        verify(listener).onAboveShelfStateChanged(true);
 +    }
 +    @Test
 +    public void testAboveShelfChangedListenerCalledWhenGoingBelow() throws Exception {
 +        ExpandableNotificationRow row = mNotificationTestHelper.createRow();
 +        row.setHeadsUp(true);
 +        AboveShelfChangedListener listener = mock(AboveShelfChangedListener.class);
 +        row.setAboveShelfChangedListener(listener);
 +        row.setAboveShelf(false);
 +        verify(listener).onAboveShelfStateChanged(false);
 +    }
  }