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

Commit c95c8f09 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Inline IMMS#setSelectedMethodIdLocked()

This is a follow up CL to our previous CL [1], which introduced
multiple utility methods into InputMethodManagerService with hoping
it'd help us encapsulate things.

Now that we are going to instantiate InputMethodBindingController in a
per-user basis, methods like

  @GuardedBy("ImfLock.class")
  private void setSelectedMethodIdLocked(
          @Nullable String selectedMethodId) {
      mBindingController.setSelectedMethodId(selectedMethodId);
  }

do not make much sense.

Let's inline this for better readability.

This is a mechanical change thus there must be no observable behavior
change.

 [1]: I9cbdd6606f7a44796f6074d0b2e904913bd48e51
      67723bf2

Bug: 325515685
Test: presubmit
Change-Id: I7d55ae9bd428d52dbb9664a79f42d6728a3148f2
parent 8727697b
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -471,11 +471,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        return mBindingController.getSelectedMethodId();
    }

    @GuardedBy("ImfLock.class")
    private void setSelectedMethodIdLocked(@Nullable String selectedMethodId) {
        mBindingController.setSelectedMethodId(selectedMethodId);
    }

    /**
     * The current binding sequence number, incremented every time there is
     * a new bind performed.
@@ -2497,7 +2492,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.

    @GuardedBy("ImfLock.class")
    void resetCurrentMethodAndClientLocked(@UnbindReason int unbindClientReason) {
        setSelectedMethodIdLocked(null);
        mBindingController.setSelectedMethodId(null);
        // Callback before clean-up binding states.
        onUnbindCurrentMethodByReset();
        mBindingController.unbindCurrentMethod();
@@ -3077,7 +3072,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            // mCurMethodId should be updated after setSelectedInputMethodAndSubtypeLocked()
            // because mCurMethodId is stored as a history in
            // setSelectedInputMethodAndSubtypeLocked().
            setSelectedMethodIdLocked(id);
            mBindingController.setSelectedMethodId(id);

            if (mActivityManagerInternal.isSystemReady()) {
                Intent intent = new Intent(Intent.ACTION_INPUT_METHOD_CHANGED);