Loading services/core/java/com/android/server/wm/ActivityStarter.java +6 −3 Original line number Diff line number Diff line Loading @@ -2329,9 +2329,9 @@ class ActivityStarter { intentActivity.setTaskToAffiliateWith(mSourceRecord.getTaskRecord()); } final ActivityStack launchStack = getLaunchStack( mStartActivity, mLaunchFlags, mStartActivity.getTaskRecord(), mOptions); final TaskRecord intentTask = intentActivity.getTaskRecord(); final ActivityStack launchStack = getLaunchStack(mStartActivity, mLaunchFlags, intentTask, mOptions); if (launchStack == null || launchStack == mTargetStack) { // We only want to move to the front, if we aren't going to launch on a // different stack. If we launch on a different stack, we will put the Loading Loading @@ -2375,9 +2375,12 @@ class ActivityStarter { REPARENT_MOVE_STACK_TO_FRONT, ANIMATE, DEFER_RESUME, "reparentingHome"); mMovedToFront = true; } else if (launchStack.topTask() == null) { } if (launchStack.topTask() == null) { // The task does not need to be reparented to the launch stack. Remove the // launch stack if there is no activity in it. Slog.w(TAG, "Removing an empty stack: " + launchStack); launchStack.remove(); } Loading services/core/java/com/android/server/wm/RootActivityContainer.java +6 −2 Original line number Diff line number Diff line Loading @@ -1780,9 +1780,13 @@ class RootActivityContainer extends ConfigurationContainer // If {@code r} is already in target display and its task is the same as the candidate task, // the intention should be getting a launch stack for the reusable activity, so we can use // the existing stack. if (r.getDisplayId() == displayId && r.getTaskRecord() == candidateTask) { if (candidateTask != null && (r.getTaskRecord() == null || r.getTaskRecord() == candidateTask)) { final int attachedDisplayId = r.getDisplayId(); if (attachedDisplayId == INVALID_DISPLAY || attachedDisplayId == displayId) { return candidateTask.getStack(); } } int windowingMode; if (launchParams != null) { Loading Loading
services/core/java/com/android/server/wm/ActivityStarter.java +6 −3 Original line number Diff line number Diff line Loading @@ -2329,9 +2329,9 @@ class ActivityStarter { intentActivity.setTaskToAffiliateWith(mSourceRecord.getTaskRecord()); } final ActivityStack launchStack = getLaunchStack( mStartActivity, mLaunchFlags, mStartActivity.getTaskRecord(), mOptions); final TaskRecord intentTask = intentActivity.getTaskRecord(); final ActivityStack launchStack = getLaunchStack(mStartActivity, mLaunchFlags, intentTask, mOptions); if (launchStack == null || launchStack == mTargetStack) { // We only want to move to the front, if we aren't going to launch on a // different stack. If we launch on a different stack, we will put the Loading Loading @@ -2375,9 +2375,12 @@ class ActivityStarter { REPARENT_MOVE_STACK_TO_FRONT, ANIMATE, DEFER_RESUME, "reparentingHome"); mMovedToFront = true; } else if (launchStack.topTask() == null) { } if (launchStack.topTask() == null) { // The task does not need to be reparented to the launch stack. Remove the // launch stack if there is no activity in it. Slog.w(TAG, "Removing an empty stack: " + launchStack); launchStack.remove(); } Loading
services/core/java/com/android/server/wm/RootActivityContainer.java +6 −2 Original line number Diff line number Diff line Loading @@ -1780,9 +1780,13 @@ class RootActivityContainer extends ConfigurationContainer // If {@code r} is already in target display and its task is the same as the candidate task, // the intention should be getting a launch stack for the reusable activity, so we can use // the existing stack. if (r.getDisplayId() == displayId && r.getTaskRecord() == candidateTask) { if (candidateTask != null && (r.getTaskRecord() == null || r.getTaskRecord() == candidateTask)) { final int attachedDisplayId = r.getDisplayId(); if (attachedDisplayId == INVALID_DISPLAY || attachedDisplayId == displayId) { return candidateTask.getStack(); } } int windowingMode; if (launchParams != null) { Loading