Do not show overflow after the last bubble dismissed (in master).
Bug: 202742002 Test: screen recording before https://drive.google.com/file/d/1KOHZnsW4BAn73slH54Rp1ZK0RXxumrw5/view?usp=sharing Test: screen recoring after https://drive.google.com/file/d/1tC6iIP2fG84pHcwoyJsySDUm9ciSzjRI/view?usp=sharing Change-Id: I2342c1c61cf38205b03e10b5ece0392f4bc70c76
This commit is contained in:
@@ -561,17 +561,10 @@ public class BubbleData {
|
||||
overflowBubble(reason, bubbleToRemove);
|
||||
|
||||
if (mBubbles.size() == 1) {
|
||||
if (hasOverflowBubbles() && (mPositioner.showingInTaskbar() || isExpanded())) {
|
||||
// No more active bubbles but we have stuff in the overflow -- select that view
|
||||
// if we're already expanded or always showing.
|
||||
setShowingOverflow(true);
|
||||
setSelectedBubbleInternal(mOverflow);
|
||||
} else {
|
||||
setExpandedInternal(false);
|
||||
// Don't use setSelectedBubbleInternal because we don't want to trigger an
|
||||
// applyUpdate
|
||||
mSelectedBubble = null;
|
||||
}
|
||||
setExpandedInternal(false);
|
||||
// Don't use setSelectedBubbleInternal because we don't want to trigger an
|
||||
// applyUpdate
|
||||
mSelectedBubble = null;
|
||||
}
|
||||
if (indexToRemove < mBubbles.size() - 1) {
|
||||
// Removing anything but the last bubble means positions will change.
|
||||
|
||||
@@ -793,7 +793,7 @@ public class BubbleDataTest extends ShellTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_expanded_removeLastBubble_showsOverflowIfNotEmpty() {
|
||||
public void test_expanded_removeLastBubble_collapsesIfOverflowNotEmpty() {
|
||||
// Setup
|
||||
sendUpdatedEntryAtTime(mEntryA1, 1000);
|
||||
changeExpandedStateAtTime(true, 2000);
|
||||
@@ -803,7 +803,7 @@ public class BubbleDataTest extends ShellTestCase {
|
||||
mBubbleData.dismissBubbleWithKey(mEntryA1.getKey(), Bubbles.DISMISS_USER_GESTURE);
|
||||
verifyUpdateReceived();
|
||||
assertThat(mBubbleData.getOverflowBubbles().size()).isGreaterThan(0);
|
||||
assertSelectionChangedTo(mBubbleData.getOverflow());
|
||||
assertExpandedChangedTo(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user