Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainerTest.java +16 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,22 @@ public class NotificationChildrenContainerTest extends SysuiTestCase { NotificationChildrenContainer.NUMBER_OF_CHILDREN_WHEN_SYSTEM_EXPANDED); } @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) public void testGetMaxAllowedVisibleChildren_bundle_userLocked() { ComposeView headerView = new ComposeView(mContext); mBundle.setBundleHeaderView(headerView); NotificationChildrenContainer childrenContainer = mBundle.getChildrenContainer(); childrenContainer.setBundleHeaderViewModel(mock(BundleHeaderViewModel.class)); mBundle.setUserLocked(true); Assert.assertEquals( "During swipe open, bundle should show the expanded number of children", NotificationChildrenContainer.NUMBER_OF_CHILDREN_BUNDLE_EXPANDED, childrenContainer.getMaxAllowedVisibleChildren()); } @Test public void testGetMaxAllowedVisibleChildren_likeCollapsed() { Assert.assertEquals(mChildrenContainer.getMaxAllowedVisibleChildren(true), Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java +2 −1 Original line number Diff line number Diff line Loading @@ -1025,7 +1025,8 @@ public class NotificationChildrenContainer extends ViewGroup @VisibleForTesting int getMaxAllowedVisibleChildren(boolean likeCollapsed) { if (isBundle()) { if (mContainingNotification.isGroupExpanded()) { if (mContainingNotification.isGroupExpanded() || mContainingNotification.isUserLocked()) { return getNumberOfChildrenWhenExpanded(); } else { return getNumberOfChildrenWhenCollapsed(); Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainerTest.java +16 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,22 @@ public class NotificationChildrenContainerTest extends SysuiTestCase { NotificationChildrenContainer.NUMBER_OF_CHILDREN_WHEN_SYSTEM_EXPANDED); } @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) public void testGetMaxAllowedVisibleChildren_bundle_userLocked() { ComposeView headerView = new ComposeView(mContext); mBundle.setBundleHeaderView(headerView); NotificationChildrenContainer childrenContainer = mBundle.getChildrenContainer(); childrenContainer.setBundleHeaderViewModel(mock(BundleHeaderViewModel.class)); mBundle.setUserLocked(true); Assert.assertEquals( "During swipe open, bundle should show the expanded number of children", NotificationChildrenContainer.NUMBER_OF_CHILDREN_BUNDLE_EXPANDED, childrenContainer.getMaxAllowedVisibleChildren()); } @Test public void testGetMaxAllowedVisibleChildren_likeCollapsed() { Assert.assertEquals(mChildrenContainer.getMaxAllowedVisibleChildren(true), Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java +2 −1 Original line number Diff line number Diff line Loading @@ -1025,7 +1025,8 @@ public class NotificationChildrenContainer extends ViewGroup @VisibleForTesting int getMaxAllowedVisibleChildren(boolean likeCollapsed) { if (isBundle()) { if (mContainingNotification.isGroupExpanded()) { if (mContainingNotification.isGroupExpanded() || mContainingNotification.isUserLocked()) { return getNumberOfChildrenWhenExpanded(); } else { return getNumberOfChildrenWhenCollapsed(); Loading