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

Commit f5f68217 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove a special rule from setExplicitlyEnabledInputMethodSubtypes()

With this CL

 InputMethodManager#setExplicitlyEnabledInputMethodSubtypes()

no longer has any special rule on whether the target user is the
current IME user or not.

Overall the observable semantics should remain unchanged.

Bug: 350386877
Test: presubmit
Flag: EXEMPT refactor
Change-Id: I3a963cb580ae1d8c252550d8c9fcfaca5313a8a2
parent c60bb9c2
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -4401,18 +4401,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        final long ident = Binder.clearCallingIdentity();
        try {
            synchronized (ImfLock.class) {
                final boolean currentUser = (mCurrentUserId == userId);
                final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
                if (!settings.setEnabledInputMethodSubtypes(imeId, subtypeHashCodes)) {
                    return;
                }
                if (currentUser) {
                // To avoid unnecessary "updateInputMethodsFromSettingsLocked" from happening.
                final var userData = getUserData(userId);
                userData.mLastEnabledInputMethodsStr = settings.getEnabledInputMethodsStr();
                updateInputMethodsFromSettingsLocked(false /* enabledChanged */, userId);
            }
            }
        } finally {
            Binder.restoreCallingIdentity(ident);
        }