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

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

Merge "Attempt to fix bubbles gesture pilfering" into main

parents 5f5a8ac1 48a73a58
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1195,6 +1195,10 @@ public class BubbleController implements ConfigurationChangeListener,
            }
        });
        try {
            if (mOnImeHidden != null) {
                Log.w(TAG, "removing bubbles from window manager with non-null onImeHidden");
            }
            mOnImeHidden = null;
            if (mStackView != null) {
                mWindowManager.removeView(mStackView);
                mBubbleData.getOverflow().cleanUpExpandedState();
+10 −1
Original line number Diff line number Diff line
@@ -2411,13 +2411,22 @@ public class BubbleStackView extends FrameLayout

        boolean wasExpanded = mIsExpanded;

        if (wasExpanded) {
            // stop monitoring gestures without waiting for the IME to hide if we're collapsing in
            // case the IME gets hidden after we already were detached from the window.
            stopMonitoringSwipeUpGesture();
        }

        // Do the actual expansion/collapse after the IME is hidden if it's currently visible in
        // order to avoid flickers
        // TODO: b/424812643 - clean up the onImeHidden runnable
        Runnable onImeHidden = () -> {
            if (!isAttachedToWindow()) {
                Log.w(TAG, "onImeHidden runnable running but we're not attached.");
            }
            mSysuiProxyProvider.getSysuiProxy().onStackExpandChanged(shouldExpand);

            if (wasExpanded) {
                stopMonitoringSwipeUpGesture();
                animateCollapse();
                showManageMenu(false);
                logBubbleEvent(mExpandedBubble,