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

Commit 3afdd34e authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Limit cases when we check if a bubble moves to split" into main

parents ba53344a f818583c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -72,9 +72,11 @@ public class BubblesTransitionObserver implements Transitions.TransitionObserver
            @NonNull SurfaceControl.Transaction finishTransaction) {
        collapseBubbleIfNeeded(info);
        if (BubbleAnythingFlagHelper.enableCreateAnyBubble()) {
            if (TransitionUtil.isOpeningType(info.getType()) && mBubbleData.hasBubbles()) {
                removeBubbleIfLaunchingToSplit(info);
            }
        }
    }

    private void collapseBubbleIfNeeded(@NonNull TransitionInfo info) {
        // --- Pre-conditions (Loop-invariant checks) ---
+1 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ class BubblesTransitionObserverTest : ShellTestCase() {
    private val bubbleData = mock<BubbleData> {
        on { isExpanded } doReturn true
        on { selectedBubble } doReturn bubble
        on { hasBubbles() } doReturn true
    }
    private val bubbleController = mock<BubbleController> {
        on { isStackAnimating } doReturn false