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

Commit 9c1784dc authored by Alex Stetson's avatar Alex Stetson Committed by Automerger Merge Worker
Browse files

Merge "Check if the display ids match when moving to top" into udc-qpr-dev am: 8d993275

parents a44170fd 8d993275
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3368,7 +3368,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        // current focused activity could be another activity in the same Task if activities are
        // displayed on adjacent TaskFragments.
        final ActivityRecord currentFocusedApp = mDisplayContent.mFocusedApp;
        if (currentFocusedApp != null && currentFocusedApp.task == task) {
        final int topFocusedDisplayId = mRootWindowContainer.getTopFocusedDisplayContent() != null
                ? mRootWindowContainer.getTopFocusedDisplayContent().getDisplayId()
                : INVALID_DISPLAY;
        if (currentFocusedApp != null && currentFocusedApp.task == task
                && topFocusedDisplayId == mDisplayContent.getDisplayId()) {
            final Task topFocusableTask = mDisplayContent.getTask(
                    (t) -> t.isLeafTask() && t.isFocusable(), true /*  traverseTopToBottom */);
            if (task == topFocusableTask) {