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

Commit c3c82f00 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Avoid handle the pointer-down-outside if the input target is invisible" into main

parents e99cc4ce d8f80e16
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -9132,9 +9132,13 @@ public class WindowManagerService extends IWindowManager.Stub

    private void handlePointerDownOutsideFocus(InputTarget t, InputTarget focusedInputTarget) {
        synchronized (mGlobalLock) {
            if (mFocusedInputTarget != focusedInputTarget) {
                // Skip if the mFocusedInputTarget is already changed. This is possible if the
                // pointer-down-outside-focus event is delayed to be handled.
            final WindowState w = t.getWindowState();
            // Skip if the mFocusedInputTarget is already changed or the touched Activity is no
            // longer visible. This is possible if the pointer-down-outside-focus event is
            // delayed to be handled.
            if (mFocusedInputTarget != focusedInputTarget || (w != null
                    && w.getActivityRecord() != null
                    && !w.getActivityRecord().isVisibleRequested())) {
                ProtoLog.i(WM_DEBUG_FOCUS_LIGHT,
                        "Skip onPointerDownOutsideFocusLocked due to input target changed %s", t);
                return;
@@ -9146,7 +9150,6 @@ public class WindowManagerService extends IWindowManager.Stub
            }
            clearPointerDownOutsideFocusRunnable();

            final WindowState w = t.getWindowState();
            if (w != null) {
                final Task task = w.getTask();
                if (task != null && w.mTransitionController.isTransientHide(task)) {