Default hide animation leash of opening tasks.

RecentsTransitionHandler doesn't know the initial tasks position when
tasks appeared, only RecentsAnimationRunner know. So there shouldn't
show the animation leash immediately, otherwise the opening tasks could
shows up in the final position, before RecentsAnimationRunner start
the opening animation.

Bug: 277704255
Test: manual, entering recents, launch another task, verify no flicker
during the opening animation.

Change-Id: I1c384b825348d8a67d49c4cec89a61a9a6f9687f
This commit is contained in:
wilsonshih
2023-04-13 13:58:16 +08:00
parent 11562e9789
commit 8c4a7b8efd

View File

@@ -565,6 +565,8 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
final int rootIdx = TransitionUtil.rootIndexFor(change, mInfo);
t.reparent(appearedTargets[i].leash, mInfo.getRoot(rootIdx).getLeash());
t.setLayer(appearedTargets[i].leash, layer);
// Hide the animation leash, let listener show it.
t.hide(appearedTargets[i].leash);
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
" opening new taskId=%d", appearedTargets[i].taskId);
mOpeningTasks.add(new TaskState(change, appearedTargets[i].leash));