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

Commit 140b1cc1 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove a special rule from setAdditionalInputMethodSubtypes()

With this CL

 InputMethodManager#setAdditionalInputMethodSubtypes()

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: Ica0c52ec872066494e5db351b1dbd1fca0e3b1d4
parent c60bb9c2
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -4356,7 +4356,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            }

            final var additionalSubtypeMap = AdditionalSubtypeMapRepository.get(userId);
            final boolean isCurrentUser = (mCurrentUserId == userId);
            final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
            final var newAdditionalSubtypeMap = settings.getNewAdditionalSubtypeMap(
                    imiId, toBeAdded, additionalSubtypeMap, mPackageManagerInternal, callingUid);
@@ -4370,10 +4369,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                            mUserManagerInternal.isUserUnlockingOrUnlocked(userId));
                    final var newSettings = InputMethodSettings.create(methodMap, userId);
                    InputMethodSettingsRepository.put(userId, newSettings);
                    if (isCurrentUser) {
                        postInputMethodSettingUpdatedLocked(false /* resetDefaultEnabledIme */,
                                userId);
                    }
                    postInputMethodSettingUpdatedLocked(false /* resetDefaultEnabledIme */, userId);
                } finally {
                    Binder.restoreCallingIdentity(ident);
                }