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

Commit 58a9d44d authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove mCurrentUserId dependency from onFinishPackageChangesInternal()

With this CL we start applying exactly the same logic among users in

  InputMethodManagerService
      .MyPackageMonitor#onFinishPackageChangesInternal()

Previously we skipped several operations when called for background
users.

No abrupt observable behavior change is expected/intended.

Bug: 350386877
Flag: EXEMPT refactor
Test: presubmit
Change-Id: I9cedf31aedce5271694e0b429a2899cf71f77252
parent bedc2b87
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -762,7 +762,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                            .getMethodMap();

            synchronized (ImfLock.class) {
                final boolean isCurrentUser = (userId == mCurrentUserId);
                final AdditionalSubtypeMap additionalSubtypeMap =
                        AdditionalSubtypeMapRepository.get(userId);
                final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
@@ -814,9 +813,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                final InputMethodSettings newSettings =
                        InputMethodSettings.create(newMethodMap, userId);
                InputMethodSettingsRepository.put(userId, newSettings);
                if (!isCurrentUser) {
                    return;
                }
                postInputMethodSettingUpdatedLocked(false /* resetDefaultEnabledIme */, userId);

                boolean changed = false;