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

Commit 764ee919 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Correctly propagate userId in IMMS#setInputMethod{,AndSubtype}

With this CL the following two mehtods no longer hard code
IMMS#mCurrentUserId.

 * InputMethodManagerService#setInputMethod
 * InputMethodManagerService#setInputMethodAndSubtype

The observable behavior should remain to be the same for single user
mode.

Bug: 350386877
Test: presubmit
Flag: android.view.inputmethod.concurrent_input_methods
Change-Id: Ia8657d21d84c138b7776b3aa3fa480b4314f4d42
parent c5002e47
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4045,7 +4045,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            if (!calledWithValidTokenLocked(token, userId)) {
                return;
            }
            final InputMethodSettings settings = InputMethodSettingsRepository.get(mCurrentUserId);
            final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
            final InputMethodInfo imi = settings.getMethodMap().get(id);
            if (imi == null || !canCallerAccessInputMethod(
                    imi.getPackageName(), callingUid, userId, settings)) {
@@ -4063,7 +4063,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            if (!calledWithValidTokenLocked(token, userId)) {
                return;
            }
            final InputMethodSettings settings = InputMethodSettingsRepository.get(mCurrentUserId);
            final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
            final InputMethodInfo imi = settings.getMethodMap().get(id);
            if (imi == null || !canCallerAccessInputMethod(
                    imi.getPackageName(), callingUid, userId, settings)) {