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

Commit 9c6ab487 authored by Liran Binyamin's avatar Liran Binyamin Committed by Android (Google) Code Review
Browse files

Merge "Remove bubble bar layer from window manager" into main

parents f196bf89 0488f4b8
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -919,6 +919,9 @@ public class BubbleController implements ConfigurationChangeListener,
        if (mStackView != null) {
            mStackView.setVisibility(INVISIBLE);
            removeFromWindowManagerMaybe();
        } else if (mLayerView != null) {
            mLayerView.setVisibility(INVISIBLE);
            removeFromWindowManagerMaybe();
        }
    }

@@ -1403,6 +1406,13 @@ public class BubbleController implements ConfigurationChangeListener,
        removeFromWindowManagerMaybe();
        mLayerView = null;
        mStackView = null;

        if (!mBubbleData.hasBubbles()) {
            // if there are no bubbles, don't create the stack or layer views. they will be created
            // later when the first bubble is added.
            return;
        }

        ensureBubbleViewsAndWindowCreated();

        // inflate bubble views
@@ -1732,6 +1742,10 @@ public class BubbleController implements ConfigurationChangeListener,
        public void removeBubble(Bubble removedBubble) {
            if (mLayerView != null) {
                mLayerView.removeBubble(removedBubble);
                if (!mBubbleData.hasBubbles() && !isStackExpanded()) {
                    mLayerView.setVisibility(INVISIBLE);
                    removeFromWindowManagerMaybe();
                }
            }
        }

+3 −0
Original line number Diff line number Diff line
@@ -273,6 +273,9 @@ public class BubbleBarLayerView extends FrameLayout
            if (endAction != null) {
                endAction.run();
            }
            if (mBubbleData.getBubbles().isEmpty()) {
                mBubbleController.onAllBubblesAnimatedOut();
            }
        };
        if (mDragController != null && mDragController.isStuckToDismiss()) {
            mAnimationHelper.animateDismiss(runnable);