Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +5 −3 Original line number Original line Diff line number Diff line Loading @@ -2177,6 +2177,9 @@ public class ActivityStackSupervisor extends ConfigurationContainer // display because it no longer contains any tasks. // display because it no longer contains any tasks. mAllowDockedStackResize = false; mAllowDockedStackResize = false; } } final ActivityStack fullscreenStack = getStack(FULLSCREEN_WORKSPACE_STACK_ID); final boolean isFullscreenStackVisible = fullscreenStack != null && fullscreenStack.getStackVisibilityLocked(null) == STACK_VISIBLE; final ArrayList<TaskRecord> tasks = stack.getAllTasks(); final ArrayList<TaskRecord> tasks = stack.getAllTasks(); final int size = tasks.size(); final int size = tasks.size(); if (onTop) { if (onTop) { Loading @@ -2186,9 +2189,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer // Update the return-to to reflect where the pinned stack task was moved // Update the return-to to reflect where the pinned stack task was moved // from so that we retain the stack that was previously visible if the // from so that we retain the stack that was previously visible if the // pinned stack is recreated. See moveActivityToPinnedStackLocked(). // pinned stack is recreated. See moveActivityToPinnedStackLocked(). final int focusedStackId = getFocusedStack().getStackId(); task.setTaskToReturnTo(isFullscreenStackVisible && onTop ? task.setTaskToReturnTo(focusedStackId == HOME_STACK_ID || !onTop APPLICATION_ACTIVITY_TYPE : HOME_ACTIVITY_TYPE); ? HOME_ACTIVITY_TYPE : APPLICATION_ACTIVITY_TYPE); } } moveTaskToStackLocked(tasks.get(i).taskId, moveTaskToStackLocked(tasks.get(i).taskId, FULLSCREEN_WORKSPACE_STACK_ID, onTop, onTop /*forceFocus*/, FULLSCREEN_WORKSPACE_STACK_ID, onTop, onTop /*forceFocus*/, Loading Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +5 −3 Original line number Original line Diff line number Diff line Loading @@ -2177,6 +2177,9 @@ public class ActivityStackSupervisor extends ConfigurationContainer // display because it no longer contains any tasks. // display because it no longer contains any tasks. mAllowDockedStackResize = false; mAllowDockedStackResize = false; } } final ActivityStack fullscreenStack = getStack(FULLSCREEN_WORKSPACE_STACK_ID); final boolean isFullscreenStackVisible = fullscreenStack != null && fullscreenStack.getStackVisibilityLocked(null) == STACK_VISIBLE; final ArrayList<TaskRecord> tasks = stack.getAllTasks(); final ArrayList<TaskRecord> tasks = stack.getAllTasks(); final int size = tasks.size(); final int size = tasks.size(); if (onTop) { if (onTop) { Loading @@ -2186,9 +2189,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer // Update the return-to to reflect where the pinned stack task was moved // Update the return-to to reflect where the pinned stack task was moved // from so that we retain the stack that was previously visible if the // from so that we retain the stack that was previously visible if the // pinned stack is recreated. See moveActivityToPinnedStackLocked(). // pinned stack is recreated. See moveActivityToPinnedStackLocked(). final int focusedStackId = getFocusedStack().getStackId(); task.setTaskToReturnTo(isFullscreenStackVisible && onTop ? task.setTaskToReturnTo(focusedStackId == HOME_STACK_ID || !onTop APPLICATION_ACTIVITY_TYPE : HOME_ACTIVITY_TYPE); ? HOME_ACTIVITY_TYPE : APPLICATION_ACTIVITY_TYPE); } } moveTaskToStackLocked(tasks.get(i).taskId, moveTaskToStackLocked(tasks.get(i).taskId, FULLSCREEN_WORKSPACE_STACK_ID, onTop, onTop /*forceFocus*/, FULLSCREEN_WORKSPACE_STACK_ID, onTop, onTop /*forceFocus*/, Loading