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

Commit 14bea363 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Simplify IMMS#startInputUncheckedLocked a bit

This is a follow up CL to our previous CL [1], which made

  InputMethodBindingController

per-user instance.

There must be no behavior change in this CL.

 [1]: Id6e9eca6caaa8edde8c4a405448c31c0ca986509
      2238ecd4

Bug: 325515685
Test: presubmit
Change-Id: I80cb41e8e9f14cb893152d31fb6c86d446e9f884
parent b7602777
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2234,7 +2234,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            mInputManagerInternal.notifyInputMethodConnectionActive(connectionIsActive);
        }
        final var userData = mUserDataRepository.getOrCreate(mCurrentUserId);

        final var bindingController = userData.mBindingController;

        // If configured, we want to avoid starting up the IME if it is not supposed to be showing
        if (shouldPreventImeStartupLocked(selectedMethodId, startInputFlags,
@@ -2243,7 +2243,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                Slog.d(TAG, "Avoiding IME startup and unbinding current input method.");
            }
            invalidateAutofillSessionLocked();
            userData.mBindingController.unbindCurrentMethod();
            bindingController.unbindCurrentMethod();
            return InputBindResult.NO_EDITOR;
        }

@@ -2275,8 +2275,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            }
        }

        userData.mBindingController.unbindCurrentMethod();
        return userData.mBindingController.bindCurrentMethod();
        bindingController.unbindCurrentMethod();
        return bindingController.bindCurrentMethod();
    }

    /**