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

Commit 313a5275 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove unnecessary query in IMMS#switchUserOnHandlerLocked()

This is a follow up CL to my previous CL [1], which started using

  InputMethodSettingsRepository

as a on-memory data repository of InputMethodSettings to avoid
unnecessary queries to PackageManagerService.

With this CL

  InputMethodManagerService#switchUserOnHandlerLocked()

also start using InputMethodSettingsRepository instead of querying
available IMEs for the new user dynamically.

This CL is supposed to improve the IME user switching latency.

 [1]: Ie2d3b7e9b75790f64789d0c2e96ae46b1dee3a1e
      03e0580e

Bug: 309837937
Bug: 329163064
Test: presubmit
Change-Id: Icfdb247ee6bbcc43ce7b09954a85bfcff31c8441
parent e5475c78
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1535,9 +1535,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
        // and user switch would not happen at that time.
        resetCurrentMethodAndClientLocked(UnbindReason.SWITCH_USER);

        final InputMethodSettings newSettings = queryInputMethodServicesInternal(mContext,
                newUserId, AdditionalSubtypeMapRepository.get(newUserId), DirectBootAwareness.AUTO);
        InputMethodSettingsRepository.put(newUserId, newSettings);
        final InputMethodSettings newSettings = InputMethodSettingsRepository.get(newUserId);
        mSettings = newSettings;
        postInputMethodSettingUpdatedLocked(initialUserSwitch /* resetDefaultEnabledIme */);
        if (TextUtils.isEmpty(mSettings.getSelectedInputMethod())) {