Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +2 −1 Original line number Diff line number Diff line Loading @@ -1790,6 +1790,7 @@ public class BubbleStackView extends FrameLayout /** * Changes the expanded state of the stack. * Don't call this directly, call mBubbleData#setExpanded. * * @param shouldExpand whether the bubble stack should appear expanded */ Loading Loading @@ -1836,7 +1837,7 @@ public class BubbleStackView extends FrameLayout } else if (mManageEduView != null && mManageEduView.getVisibility() == VISIBLE) { mManageEduView.hide(); } else { setExpanded(false); mBubbleData.setExpanded(false); } } } Loading packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +16 −0 Original line number Diff line number Diff line Loading @@ -1339,6 +1339,22 @@ public class BubblesTest extends SysuiTestCase { assertThat(mBubbleData.hasOverflowBubbleWithKey(entry.getKey())).isFalse(); } @Test public void testStackViewOnBackPressed_updatesBubbleDataExpandState() { mBubbleController.updateBubble(mBubbleEntry); // Expand the stack mBubbleData.setExpanded(true); assertStackExpanded(); // Hit back BubbleStackView stackView = mBubbleController.getStackView(); stackView.onBackPressed(); // Make sure we're collapsed assertStackCollapsed(); } /** Creates a bubble using the userId and package. */ private Bubble createBubble(int userId, String pkg) { final UserHandle userHandle = new UserHandle(userId); Loading packages/SystemUI/tests/src/com/android/systemui/wmshell/NewNotifPipelineBubblesTest.java +16 −0 Original line number Diff line number Diff line Loading @@ -1158,6 +1158,22 @@ public class NewNotifPipelineBubblesTest extends SysuiTestCase { assertThat(mBubbleData.hasOverflowBubbleWithKey(entry.getKey())).isFalse(); } @Test public void testStackViewOnBackPressed_updatesBubbleDataExpandState() { mBubbleController.updateBubble(mBubbleEntry); // Expand the stack mBubbleData.setExpanded(true); assertStackExpanded(); // Hit back BubbleStackView stackView = mBubbleController.getStackView(); stackView.onBackPressed(); // Make sure we're collapsed assertStackCollapsed(); } /** * Sets the bubble metadata flags for this entry. These flags are normally set by * NotificationManagerService when the notification is sent, however, these tests do not Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +2 −1 Original line number Diff line number Diff line Loading @@ -1790,6 +1790,7 @@ public class BubbleStackView extends FrameLayout /** * Changes the expanded state of the stack. * Don't call this directly, call mBubbleData#setExpanded. * * @param shouldExpand whether the bubble stack should appear expanded */ Loading Loading @@ -1836,7 +1837,7 @@ public class BubbleStackView extends FrameLayout } else if (mManageEduView != null && mManageEduView.getVisibility() == VISIBLE) { mManageEduView.hide(); } else { setExpanded(false); mBubbleData.setExpanded(false); } } } Loading
packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +16 −0 Original line number Diff line number Diff line Loading @@ -1339,6 +1339,22 @@ public class BubblesTest extends SysuiTestCase { assertThat(mBubbleData.hasOverflowBubbleWithKey(entry.getKey())).isFalse(); } @Test public void testStackViewOnBackPressed_updatesBubbleDataExpandState() { mBubbleController.updateBubble(mBubbleEntry); // Expand the stack mBubbleData.setExpanded(true); assertStackExpanded(); // Hit back BubbleStackView stackView = mBubbleController.getStackView(); stackView.onBackPressed(); // Make sure we're collapsed assertStackCollapsed(); } /** Creates a bubble using the userId and package. */ private Bubble createBubble(int userId, String pkg) { final UserHandle userHandle = new UserHandle(userId); Loading
packages/SystemUI/tests/src/com/android/systemui/wmshell/NewNotifPipelineBubblesTest.java +16 −0 Original line number Diff line number Diff line Loading @@ -1158,6 +1158,22 @@ public class NewNotifPipelineBubblesTest extends SysuiTestCase { assertThat(mBubbleData.hasOverflowBubbleWithKey(entry.getKey())).isFalse(); } @Test public void testStackViewOnBackPressed_updatesBubbleDataExpandState() { mBubbleController.updateBubble(mBubbleEntry); // Expand the stack mBubbleData.setExpanded(true); assertStackExpanded(); // Hit back BubbleStackView stackView = mBubbleController.getStackView(); stackView.onBackPressed(); // Make sure we're collapsed assertStackCollapsed(); } /** * Sets the bubble metadata flags for this entry. These flags are normally set by * NotificationManagerService when the notification is sent, however, these tests do not Loading