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

Commit 1bee0087 authored by Joshua Tsuji's avatar Joshua Tsuji Committed by Matt Casey
Browse files

Add a public method to BubbleController to hide the IME.

Since the IME focus is given to the virtual display inside the expanded bubble, whatever method Screenshots is using to hide the IME doesn't work.

Test: manual
Bug: 157756391
Change-Id: Ic052133c29f269c264f4b2e8dbce29414702e634
parent f909d9f0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -415,6 +415,16 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
        mCallbacks.add(callback);
    }

    /**
     * Dispatches a back press into the expanded Bubble's ActivityView if its IME is visible,
     * causing it to hide.
     */
    public void hideImeFromExpandedBubble() {
        if (mStackView != null) {
            mStackView.hideImeFromExpandedBubble();
        }
    }

    private void setupNEM() {
        mNotificationEntryManager.addNotificationEntryListener(
                new NotificationEntryListener() {
+9 −5
Original line number Diff line number Diff line
@@ -1656,6 +1656,14 @@ public class BubbleStackView extends FrameLayout
        }
    }

    void hideImeFromExpandedBubble() {
        if (mExpandedBubble != null && mExpandedBubble.getExpandedView() != null) {
            // Hide the currently expanded bubble's IME if it's visible before switching to a new
            // bubble.
            mExpandedBubble.getExpandedView().hideImeIfVisible();
        }
    }

    private void beforeExpandedViewAnimation() {
        hideFlyoutImmediate();
        updateExpandedBubble();
@@ -2238,11 +2246,7 @@ public class BubbleStackView extends FrameLayout
            Log.d(TAG, "updateExpandedBubble()");
        }

        if (mExpandedBubble != null && mExpandedBubble.getExpandedView() != null) {
            // Hide the currently expanded bubble's IME if it's visible before switching to a new
            // bubble.
            mExpandedBubble.getExpandedView().hideImeIfVisible();
        }
        hideImeFromExpandedBubble();

        mExpandedViewContainer.removeAllViews();
        if (mIsExpanded && mExpandedBubble != null