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

Commit c7e7e307 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove mCurrentUserId dependency from switchToInputMethodLocked" into main

parents 8b4f51de f96adf35
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -5706,15 +5706,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        if (!CollectionUtils.any(enabledImes, imi -> imi.getId().equals(imeId))) {
            return false; // IME is not found or not enabled.
        }
        if (mConcurrentMultiUserModeEnabled || userId == mCurrentUserId) {
        setInputMethodLocked(imeId, subtypeId, userId);
        return true;
    }
        settings.putSelectedInputMethod(imeId);
        // For non-current user, only reset subtypeId (instead of setting the given one).
        settings.putSelectedSubtype(NOT_A_SUBTYPE_ID);
        return true;
    }

    /**
     * Filter the access to the input method by rules of the package visibility. Return {@code true}