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

Commit d9f8adde authored by Felix Stern's avatar Felix Stern Committed by Android (Google) Code Review
Browse files

Merge "Set window visibility when user switch is triggered" into main

parents 5626227f 6ee82749
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1209,8 +1209,14 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        // Hide soft input before user switch task since switch task may block main handler a while
        // and delayed the hideCurrentInputLocked().
        final var userData = getUserData(userId);
        if (Flags.refactorInsetsController()) {
            final var statsToken = createStatsTokenForFocusedClient(false /* show */,
                    SoftInputShowHideReason.HIDE_SWITCH_USER, userId);
            setImeVisibilityOnFocusedWindowClient(false, userData, statsToken);
        } else {
            hideCurrentInputLocked(userData.mImeBindingState.mFocusedWindow, 0 /* flags */,
                    SoftInputShowHideReason.HIDE_SWITCH_USER, userId);
        }
        final UserSwitchHandlerTask task = new UserSwitchHandlerTask(this, userId,
                clientToBeReset);
        mUserSwitchHandlerTask = task;