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

Commit 584dcb60 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Simplify IMMS#shouldShowImeSwitcherLocked()

This is a mechcanical refactoring CL that aims to simplify the code by
taking advantage of per-user InputMethodBindingController instance we
recently introduced [1].

There must be no observable behavior change.

 [1]: Id6e9eca6caaa8edde8c4a405448c31c0ca986509
      2238ecd4

Bug: 325515685
Test: presubmit
Change-Id: I40cf0ce1260df703d542fff66bf3511cf8fa1f59
parent 3c1d8be8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2635,7 +2635,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        if (mMenuController.getSwitchingDialogLocked() != null) return false;
        // When we are switching IMEs, the IME switcher button should be hidden.
        final var userData = mUserDataRepository.getOrCreate(mCurrentUserId);
        if (!Objects.equals(userData.mBindingController.getCurId(), getSelectedMethodIdLocked())) {
        final var bindingController = userData.mBindingController;
        if (!Objects.equals(bindingController.getCurId(),
                bindingController.getSelectedMethodId())) {
            return false;
        }
        if (mWindowManagerInternal.isKeyguardShowingAndNotOccluded()