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

Commit 3d4249eb authored by Antonio Kantek's avatar Antonio Kantek Committed by Android (Google) Code Review
Browse files

Merge "Fix resolveImeUserIdLocked bug on non-concurrent multi-user mode" into main

parents 5f4246e5 1abd2c64
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -350,14 +350,16 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
    @BinderThread
    private int resolveImeUserIdLocked(@UserIdInt int callingProcessUserId,
            @NonNull IInputMethodClient client) {
        if (mConcurrentMultiUserModeEnabled
                && callingProcessUserId == UserHandle.USER_SYSTEM) {
        if (mConcurrentMultiUserModeEnabled) {
            if (callingProcessUserId == UserHandle.USER_SYSTEM) {
                final var clientState = mClientController.getClient(client.asBinder());
                return mUserManagerInternal.getUserAssignedToDisplay(
                        clientState.mSelfReportedDisplayId);
            }
            return callingProcessUserId;
        }
        return mCurrentImeUserId;
    }

   /**
     * Figures out the target IME user ID associated with the given {@code displayId}.