From 8c4a7b8efd1e9edfb24a4e952ca3b9b679bc4973 Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Thu, 13 Apr 2023 13:58:16 +0800 Subject: [PATCH] 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 --- .../com/android/wm/shell/recents/RecentsTransitionHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java index b554872582208..0482bada47cb2 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java @@ -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));