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

Commit ecc63bcb 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:...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24527003



Change-Id: I086b02c81d8797d9126733818b3c474deef72937
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1a3760f4 9c1784dc
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3363,7 +3363,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) {