Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba5ad704 authored by Michał Brzeziński's avatar Michał Brzeziński Committed by Android (Google) Code Review
Browse files

Merge "Revert "Do not show overflow after the last bubble dismissed (in master).""

parents ea650c5c 8ec09524
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -561,11 +561,18 @@ 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;
            }
        }
        if (indexToRemove < mBubbles.size() - 1) {
            // Removing anything but the last bubble means positions will change.
            mStateChange.orderChanged = true;
+2 −2
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ public class BubbleDataTest extends ShellTestCase {
    }

    @Test
    public void test_expanded_removeLastBubble_collapsesIfOverflowNotEmpty() {
    public void test_expanded_removeLastBubble_showsOverflowIfNotEmpty() {
        // 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);
        assertExpandedChangedTo(false);
        assertSelectionChangedTo(mBubbleData.getOverflow());
    }

    @Test