Loading services/core/java/com/android/server/wm/ActivityStack.java +3 −16 Original line number Diff line number Diff line Loading @@ -3664,8 +3664,9 @@ class ActivityStack extends WindowContainer<WindowContainer> implements BoundsAn } final DisplayContent display = getDisplay(); final boolean topFocused = mRootActivityContainer.isTopDisplayFocusedStack(this); if (DEBUG_TASK_MOVEMENT) Slog.d(TAG_WM, "removeChild: task=" + child); if (DEBUG_TASK_MOVEMENT) { Slog.d(TAG_WM, "removeChild: task=" + child + " reason=" + reason); } super.removeChild(child); Loading @@ -3681,8 +3682,6 @@ class ActivityStack extends WindowContainer<WindowContainer> implements BoundsAn // Stack is now empty... removeIfPossible(); } moveHomeStackToFrontIfNeeded(topFocused, display, reason); } @Override Loading @@ -3690,18 +3689,6 @@ class ActivityStack extends WindowContainer<WindowContainer> implements BoundsAn removeChild(child, "removeChild"); } void moveHomeStackToFrontIfNeeded( boolean wasTopFocusedStack, DisplayContent display, String reason) { if (!hasChild() && wasTopFocusedStack) { // We only need to adjust focused stack if this stack is in focus and we are not in the // process of moving the task to the top of the stack that will be focused. String myReason = reason + " leftTaskHistoryEmpty"; if (!inMultiWindowMode() || adjustFocusToNextFocusableStack(myReason) == null) { display.moveHomeStackToFront(myReason); } } } Task createTask(int taskId, ActivityInfo info, Intent intent, IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor, boolean toTop) { Loading services/core/java/com/android/server/wm/Task.java +1 −11 Original line number Diff line number Diff line Loading @@ -2182,22 +2182,12 @@ class Task extends WindowContainer<WindowContainer> { void reparent(ActivityStack stack, int position, boolean moveParents, String reason) { if (DEBUG_STACK) Slog.i(TAG, "reParentTask: removing taskId=" + mTaskId + " from stack=" + getTaskStack()); EventLogTags.writeWmTaskRemoved(mTaskId, "reParentTask"); final ActivityStack prevStack = getTaskStack(); final boolean wasTopFocusedStack = mAtmService.mRootActivityContainer.isTopDisplayFocusedStack(prevStack); final DisplayContent prevStackDisplay = prevStack.getDisplay(); EventLogTags.writeWmTaskRemoved(mTaskId, "reParentTask:" + reason); position = stack.findPositionForTask(this, position, showForAllUsers()); reparent(stack, position); if (!moveParents) { // Only move home stack forward if we are not going to move the new parent forward. prevStack.moveHomeStackToFrontIfNeeded(wasTopFocusedStack, prevStackDisplay, reason); } stack.positionChildAt(position, this, moveParents); // If we are moving from the fullscreen stack to the pinned stack then we want to preserve Loading Loading
services/core/java/com/android/server/wm/ActivityStack.java +3 −16 Original line number Diff line number Diff line Loading @@ -3664,8 +3664,9 @@ class ActivityStack extends WindowContainer<WindowContainer> implements BoundsAn } final DisplayContent display = getDisplay(); final boolean topFocused = mRootActivityContainer.isTopDisplayFocusedStack(this); if (DEBUG_TASK_MOVEMENT) Slog.d(TAG_WM, "removeChild: task=" + child); if (DEBUG_TASK_MOVEMENT) { Slog.d(TAG_WM, "removeChild: task=" + child + " reason=" + reason); } super.removeChild(child); Loading @@ -3681,8 +3682,6 @@ class ActivityStack extends WindowContainer<WindowContainer> implements BoundsAn // Stack is now empty... removeIfPossible(); } moveHomeStackToFrontIfNeeded(topFocused, display, reason); } @Override Loading @@ -3690,18 +3689,6 @@ class ActivityStack extends WindowContainer<WindowContainer> implements BoundsAn removeChild(child, "removeChild"); } void moveHomeStackToFrontIfNeeded( boolean wasTopFocusedStack, DisplayContent display, String reason) { if (!hasChild() && wasTopFocusedStack) { // We only need to adjust focused stack if this stack is in focus and we are not in the // process of moving the task to the top of the stack that will be focused. String myReason = reason + " leftTaskHistoryEmpty"; if (!inMultiWindowMode() || adjustFocusToNextFocusableStack(myReason) == null) { display.moveHomeStackToFront(myReason); } } } Task createTask(int taskId, ActivityInfo info, Intent intent, IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor, boolean toTop) { Loading
services/core/java/com/android/server/wm/Task.java +1 −11 Original line number Diff line number Diff line Loading @@ -2182,22 +2182,12 @@ class Task extends WindowContainer<WindowContainer> { void reparent(ActivityStack stack, int position, boolean moveParents, String reason) { if (DEBUG_STACK) Slog.i(TAG, "reParentTask: removing taskId=" + mTaskId + " from stack=" + getTaskStack()); EventLogTags.writeWmTaskRemoved(mTaskId, "reParentTask"); final ActivityStack prevStack = getTaskStack(); final boolean wasTopFocusedStack = mAtmService.mRootActivityContainer.isTopDisplayFocusedStack(prevStack); final DisplayContent prevStackDisplay = prevStack.getDisplay(); EventLogTags.writeWmTaskRemoved(mTaskId, "reParentTask:" + reason); position = stack.findPositionForTask(this, position, showForAllUsers()); reparent(stack, position); if (!moveParents) { // Only move home stack forward if we are not going to move the new parent forward. prevStack.moveHomeStackToFrontIfNeeded(wasTopFocusedStack, prevStackDisplay, reason); } stack.positionChildAt(position, this, moveParents); // If we are moving from the fullscreen stack to the pinned stack then we want to preserve Loading