Don't collect task on activity-start

Since the task is not changing, don't collect it.

Bug: b/258043830
Test: atest IncompleteMotionTest
Change-Id: I511a4adcbe8a3eca605a98a8b8ea090bd7e82c56
This commit is contained in:
Evan Rosky
2022-11-07 19:17:01 -08:00
parent a194e30908
commit 41de612358

View File

@@ -3037,7 +3037,12 @@ class ActivityStarter {
newParent = candidateTf;
}
}
newParent.mTransitionController.collect(newParent);
if (newParent.asTask() == null) {
// only collect task-fragments.
// TODO(b/258095975): we probably shouldn't ever collect the parent here since it isn't
// changing. The logic that changes it should collect it.
newParent.mTransitionController.collect(newParent);
}
if (mStartActivity.getTaskFragment() == null
|| mStartActivity.getTaskFragment() == newParent) {
newParent.addChild(mStartActivity, POSITION_TOP);