Merge "Don't promote the animation on Task's parent when clearing task" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-16 13:38:49 +00:00
committed by Android (Google) Code Review

View File

@@ -623,7 +623,11 @@ public class AppTransitionController {
siblings.add(current); siblings.add(current);
boolean canPromote = true; boolean canPromote = true;
if (parent == null || !parent.canCreateRemoteAnimationTarget()) { if (parent == null || !parent.canCreateRemoteAnimationTarget()
// We cannot promote the animation on Task's parent when the task is in
// clearing task in case the animating get stuck when performing the opening
// task that behind it.
|| (current.asTask() != null && current.asTask().mInRemoveTask)) {
canPromote = false; canPromote = false;
} else { } else {
// In case a descendant of the parent belongs to the other group, we cannot promote // In case a descendant of the parent belongs to the other group, we cannot promote