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

Commit 49bb2106 authored by Liran Binyamin's avatar Liran Binyamin
Browse files

Fix bubble manage menu after dismissing bubble

After dragging to dismiss a bubble and tapping on the manage button, the manage menu is now displayed correctly on top of the expanded view.

Previously, the expanded view is marked temporarily hidden when the drag motion starts. The surface z ordering is reset at the start of the expanded view animation, and then set again when it ends.
However, because the expanded view is temporarily hidden, the z ordering doesn't get set at the end. This change sets it when the bubble switch animation ends right after the expanded view is no longer temporarily hidden.

Flag: NA
Fixes: 280355857
Test: Manual
      - Add 2 bubbles
      - Expand bubble stack
      - Drag the selected bubble to dismiss
      - The second bubble should be selected
      - Tap on the manage button
      - Observe that the manage menu is drawn on top of the expanded view
Change-Id: I4410c591e88881d9e434dbdb7f7d2e250c0f718b
parent a2d78978
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -2612,6 +2612,18 @@ public class BubbleStackView extends FrameLayout
                        mExpandedViewTemporarilyHidden = false;
                        mIsBubbleSwitchAnimating = false;
                        mExpandedViewContainer.setAnimationMatrix(null);

                        // When a bubble is being dragged, the expanded view is temporarily hidden.
                        // If the motion ends with dismissing the bubble, with multiple bubbles in
                        // the stack, we'll end up here to switch to the new bubble. However, the
                        // expanded view animation might not actually set the z ordering for the
                        // expanded view correctly, because the view may still be temporarily
                        // hidden. So set it again here.
                        BubbleExpandedView bev = mExpandedBubble.getExpandedView();
                        if (bev != null) {
                            mExpandedBubble.getExpandedView().setSurfaceZOrderedOnTop(false);
                            mExpandedBubble.getExpandedView().setAnimating(false);
                        }
                    })
                    .start();
        }, 25);
@@ -2691,7 +2703,7 @@ public class BubbleStackView extends FrameLayout
                if (!mExpandedBubble.getExpandedView().isUsingMaxHeight()) {
                    mExpandedViewContainer.animate().translationY(newExpandedViewTop);
                }
                List<Animator> animList = new ArrayList();
                List<Animator> animList = new ArrayList<>();
                for (int i = 0; i < mBubbleContainer.getChildCount(); i++) {
                    View child = mBubbleContainer.getChildAt(i);
                    float transY = mPositioner.getExpandedBubbleXY(i, getState()).y;