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

Commit f8dfeec1 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Android (Google) Code Review
Browse files

Merge "Only place new task in focus stack if it is full screen stack."

parents 8b8cad8b 13a9b16d
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1807,8 +1807,11 @@ public final class ActivityStackSupervisor implements DisplayListener {
                return container.mStack;
            }

            if (mFocusedStack != mHomeStack && (!newTask ||
                    mFocusedStack.mActivityContainer.isEligibleForNewTasks())) {
            // The fullscreen stack is the only stack that can contain any task regardless of if
            // the task is resizeable or not. So, we let the task go in the fullscreen task if it
            // is the focus stack.
            if (mFocusedStack.mStackId == FULLSCREEN_WORKSPACE_STACK_ID
                    && (!newTask || mFocusedStack.mActivityContainer.isEligibleForNewTasks())) {
                if (DEBUG_FOCUS || DEBUG_STACK) Slog.d(TAG_FOCUS,
                        "computeStackFocus: Have a focused stack=" + mFocusedStack);
                return mFocusedStack;
@@ -1827,7 +1830,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
            }

            // If there is no suitable dynamic stack then we figure out which static stack to use.
            int stackId = task != null ? task.getLaunchStackId() :
            final int stackId = task != null ? task.getLaunchStackId() :
                        bounds != null ? FREEFORM_WORKSPACE_STACK_ID :
                                         FULLSCREEN_WORKSPACE_STACK_ID;
            stack = getStack(stackId, CREATE_IF_NEEDED, ON_TOP);