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

Commit 19ba860d authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Inline IMMS#isSelectedMethodBoundLocked()" into main

parents 61aaa158 0049e994
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -2250,7 +2250,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        // Check if the input method is changing.
        // We expect the caller has already verified that the client is allowed to access this
        // display ID.
        if (isSelectedMethodBoundLocked()) {
        final String curId = bindingController.getCurId();
        if (curId != null && curId.equals(bindingController.getSelectedMethodId())
                && mDisplayIdToShowIme == mCurTokenDisplayId) {
            if (cs.mCurSession != null) {
                // Fast case: if we are already connected to the input method,
                // then just return it.
@@ -2368,13 +2370,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        return true;
    }

    @GuardedBy("ImfLock.class")
    private boolean isSelectedMethodBoundLocked() {
        String curId = getCurIdLocked();
        return curId != null && curId.equals(getSelectedMethodIdLocked())
                && mDisplayIdToShowIme == mCurTokenDisplayId;
    }

    @GuardedBy("ImfLock.class")
    private void prepareClientSwitchLocked(ClientState cs) {
        // If the client is changing, we need to switch over to the new