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

Commit 449c437b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix dismissing bubbles from launcher/bubble bar not showing in overflow" into main

parents fc0d9e19 7a460fd3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -948,10 +948,11 @@ public class BubbleData {
    }

    void overflowBubble(@DismissReason int reason, Bubble bubble) {
        if (bubble.getPendingIntentCanceled()
                || !(reason == Bubbles.DISMISS_AGED
        boolean isOverflowReason = reason == Bubbles.DISMISS_AGED
                || reason == Bubbles.DISMISS_USER_GESTURE
                || reason == Bubbles.DISMISS_RELOAD_FROM_DISK)) {
                || reason == Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER
                || reason == Bubbles.DISMISS_RELOAD_FROM_DISK;
        if (bubble.getPendingIntentCanceled() || !isOverflowReason) {
            return;
        }
        ProtoLog.d(WM_SHELL_BUBBLES, "overflowBubble=%s reason=%s", bubble.getKey(),
+14 −0
Original line number Diff line number Diff line
@@ -533,6 +533,20 @@ public class BubbleDataTest extends ShellTestCase {
        assertOverflowChangedTo(ImmutableList.of());
    }

    @Test
    public void testOverflow_dismissFromLauncher_addsOverflowBubble() {
        // Setup
        sendUpdatedEntryAtTime(mEntryA1, 1000);
        sendUpdatedEntryAtTime(mEntryA2, 2000);
        mBubbleData.setListener(mListener);

        // Test
        mBubbleData.dismissBubbleWithKey(mEntryA1.getKey(),
                Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER);
        verifyUpdateReceived();
        assertOverflowChangedTo(ImmutableList.of(mBubbleA1));
    }

    /**
     * Verifies that the update shouldn't show the user education, if the education is not required
     */