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

Commit 81fa0e6b authored by Nikolas Havrikov's avatar Nikolas Havrikov
Browse files

Extract removing current window token

Bug: 205676419
Test: make
Change-Id: Ie6ba42d3b2ca86e2f0270bf8190632ec09d5b1da
parent c6fcc924
Loading
Loading
Loading
Loading
+18 −13
Original line number Diff line number Diff line
@@ -2687,11 +2687,20 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        }

        if (getCurToken() != null) {
            removeCurrentTokenLocked();
        }

        setCurId(null);
        clearCurMethodLocked();
    }

    @GuardedBy("mMethodMap")
    void removeCurrentTokenLocked() {
        IBinder token = getCurToken();
        if (DEBUG) {
                Slog.v(TAG, "Removing window token: " + getCurToken() + " for display: "
                        + mCurTokenDisplayId);
            Slog.v(TAG, "Removing window token: " + token + " for display: " + mCurTokenDisplayId);
        }
            mWindowManagerInternal.removeWindowToken(getCurToken(), false /* removeWindows */,
        mWindowManagerInternal.removeWindowToken(token, false /* removeWindows */,
                false /* animateExit */, mCurTokenDisplayId);
        // Set IME window status as invisible when unbind current method.
        mImeWindowVis = 0;
@@ -2702,10 +2711,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        mCurHostInputToken = null;
    }

        setCurId(null);
        clearCurMethodLocked();
    }

    @GuardedBy("mMethodMap")
    void resetCurrentMethodAndClientLocked(@UnbindReason int unbindClientReason) {
        setSelectedMethodId(null);