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

Commit 3b549f84 authored by Arthur Hung's avatar Arthur Hung Committed by Automerger Merge Worker
Browse files

Merge "Remove focus if no window and current focus is valid" into tm-dev am: f13bfa6c

parents 092a667e f13bfa6c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -414,10 +414,9 @@ final class InputMonitor {


        final IBinder focusToken = focus != null ? focus.mInputChannelToken : null;
        final IBinder focusToken = focus != null ? focus.mInputChannelToken : null;
        if (focusToken == null) {
        if (focusToken == null) {
            mInputFocus = null;
            // When an app is focused, but its window is not showing yet, remove the input focus
            // When an app is focused, but its window is not showing yet, remove the input focus
            // from the current window.
            // from the current window.
            if (mDisplayContent.mFocusedApp != null) {
            if (mDisplayContent.mFocusedApp != null && mInputFocus != null) {
                ProtoLog.v(WM_DEBUG_FOCUS_LIGHT, "App %s is focused,"
                ProtoLog.v(WM_DEBUG_FOCUS_LIGHT, "App %s is focused,"
                        + " but the window is not ready. Start a transaction to remove focus from"
                        + " but the window is not ready. Start a transaction to remove focus from"
                        + " the window of non-focused apps.",
                        + " the window of non-focused apps.",
@@ -426,6 +425,7 @@ final class InputMonitor {
                        "reason=UpdateInputWindows");
                        "reason=UpdateInputWindows");
                mInputTransaction.removeCurrentInputFocus(mDisplayId);
                mInputTransaction.removeCurrentInputFocus(mDisplayId);
            }
            }
            mInputFocus = null;
            return;
            return;
        }
        }