Merge "No need to 'addChild' when start 'FLAG_ACTIVITY_CLEAR_TOP' Activity." am: 5fa55ef1c8

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icb4e1456c4e6c93e75f4acc3bec04c76848d985f
This commit is contained in:
Louis Chang
2021-02-04 01:11:14 +00:00
committed by Automerger Merge Worker

View File

@@ -2023,13 +2023,6 @@ class ActivityStarter {
final ActivityRecord top = targetTask.performClearTaskForReuseLocked(mStartActivity,
mLaunchFlags);
// The above code can remove {@code reusedActivity} from the task, leading to the
// {@code ActivityRecord} removing its reference to the {@code Task}. The task
// reference is needed in the call below to {@link setTargetStackAndMoveToFrontIfNeeded}
if (targetTaskTop.getTask() == null) {
targetTask.addChild(targetTaskTop);
}
if (top != null) {
if (top.isRootOfTask()) {
// Activity aliases may mean we use different intents for the top activity,