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

Commit 6acbfda1 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Replace some mCurrentUserId with userId in IMMS

This is a follow up CL to my previous CL [1], which hooked up major
per-user call flows in IMMS.

The observable behavior should remain to be the same for single user
mode, and for concurrent multi-user mode the new behavior should be
the right one.

 [1]: I9d4615e6da979204c21555e040a687163c1460ab
      e08e5c4a

Bug: 350386877
Bug: 325515685
Flag: android.view.inputmethod.concurrent_input_methods
Test: presubmit
Change-Id: Iba3504ccfea7477f98b8f9c4dbef2bf5ebf061fb
parent 944433b0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1888,7 +1888,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.

        final boolean restarting = !initial;
        final Binder startInputToken = new Binder();
        final StartInputInfo info = new StartInputInfo(mCurrentUserId,
        final StartInputInfo info = new StartInputInfo(userId,
                bindingController.getCurToken(), bindingController.getCurTokenDisplayId(),
                bindingController.getCurId(), startInputReason,
                restarting, UserHandle.getUserId(userData.mCurClient.mUid),
@@ -2576,7 +2576,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                } else if (packageName != null) {
                    if (DEBUG) Slog.d(TAG, "show a small icon for the input method");
                    final PackageManager userAwarePackageManager =
                            getPackageManagerForUser(mContext, mCurrentUserId);
                            getPackageManagerForUser(mContext, userId);
                    ApplicationInfo applicationInfo = null;
                    try {
                        applicationInfo = userAwarePackageManager.getApplicationInfo(packageName,
@@ -4682,7 +4682,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            return;
        } else {
            // Called with current IME's token.
            final InputMethodSettings settings = InputMethodSettingsRepository.get(mCurrentUserId);
            final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
            if (settings.getMethodMap().get(id) != null
                    && settings.getEnabledInputMethodListWithFilter(
                            (info) -> info.getId().equals(id)).isEmpty()) {