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

Commit 2c597cec authored by Sandro Meier's avatar Sandro Meier Committed by Android (Google) Code Review
Browse files

Merge "Align moving display to top behavior"

parents 7673bf1e 4c0c6a87
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -3174,7 +3174,8 @@ public class WindowManagerService extends IWindowManager.Stub

    /**
     * Moves the given display to the top. If it cannot be moved to the top this method does
     * nothing.
     * nothing (e.g. if the display has the flag FLAG_STEAL_TOP_FOCUS_DISABLED set).
     * @param displayId The display to move to the top.
     */
    void moveDisplayToTopInternal(int displayId) {
        synchronized (mGlobalLock) {
@@ -3189,14 +3190,6 @@ public class WindowManagerService extends IWindowManager.Stub
                    return;
                }

                if (mPerDisplayFocusEnabled) {
                    ProtoLog.i(WM_DEBUG_FOCUS_LIGHT,
                            "Not moving display (displayId=%d) to top. Top focused displayId=%d. "
                                    + "Reason: config_perDisplayFocusEnabled", displayId,
                            mRoot.getTopFocusedDisplayContent().getDisplayId());
                    return;
                }

                // Nothing prevented us from moving the display to the top. Let's do it!
                displayContent.getParent().positionChildAt(WindowContainer.POSITION_TOP,
                        displayContent, true /* includingParents */);
+0 −1
Original line number Diff line number Diff line
@@ -6241,7 +6241,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP

    @Override
    public void handleTapOutsideFocusInsideSelf() {
        final DisplayContent displayContent = getDisplayContent();
        mWmService.moveDisplayToTopInternal(getDisplayId());
        mWmService.handleTaskFocusChange(getTask(), mActivityRecord);
    }