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

Commit 05c670e1 authored by Yabin Huang's avatar Yabin Huang
Browse files

Update IMMI#removeImeSurface() to take display ID

To support multi-session IME, IMMI needs to know the display hosting
the IME window. So this CL gets the display ID from DisplayContent,
and passes it to IMMI.

This CL just passes an unused parameter to IMMS. It doesn't change
the behavior of the code, thus no flag is required. The passed
parameter will be used by another CL to implement the multi-session
IME, and that CL will be protected by the concurrent_input_methods
feature flag.

Bug: 305829876
Test: atest WmTests && atest FrameworksServicesTests
Change-Id: Ib0fea5997990a72b93e8407fa19902b2258df0d6
parent 029cac40
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -171,9 +171,11 @@ public abstract class InputMethodManagerInternal {
    public abstract void onImeParentChanged();

    /**
     * Destroys the IME surface.
     * Destroys the IME surface for the given display.
     *
     * @param displayId the display hosting the IME window
     */
    public abstract void removeImeSurface();
    public abstract void removeImeSurface(int displayId);

    /**
     * Updates the IME visibility, back disposition and show IME picker status for SystemUI.
@@ -292,7 +294,7 @@ public abstract class InputMethodManagerInternal {
                }

                @Override
                public void removeImeSurface() {
                public void removeImeSurface(int displayId) {
                }

                @Override
+1 −1
Original line number Diff line number Diff line
@@ -5683,7 +5683,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
        }

        @Override
        public void removeImeSurface() {
        public void removeImeSurface(int displayId) {
            mHandler.obtainMessage(MSG_REMOVE_IME_SURFACE).sendToTarget();
        }

+1 −1
Original line number Diff line number Diff line
@@ -7060,7 +7060,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        }

        @Override
        public void notifyInsetsControlChanged() {
        public void notifyInsetsControlChanged(int displayId) {
            final InsetsStateController stateController = getInsetsStateController();
            try {
                mRemoteInsetsController.insetsControlChanged(stateController.getRawInsetsState(),
+3 −1
Original line number Diff line number Diff line
@@ -29,8 +29,10 @@ interface InsetsControlTarget {

    /**
     * Notifies the control target that the insets control has changed.
     *
     * @param displayId the display hosting the window of this target
     */
    default void notifyInsetsControlChanged() {
    default void notifyInsetsControlChanged(int displayId) {
    };

    /**
+1 −1
Original line number Diff line number Diff line
@@ -715,7 +715,7 @@ class InsetsPolicy {
        }

        @Override
        public void notifyInsetsControlChanged() {
        public void notifyInsetsControlChanged(int displayId) {
            mHandler.post(this);
        }

Loading