From c6feebfd9598e106f0cb1394271da14b5b9cb983 Mon Sep 17 00:00:00 2001 From: Tony Huang Date: Tue, 20 Jun 2023 15:51:57 +0800 Subject: [PATCH] Do not add divider to dismiss transition If there is also a display change in same transition, we need to release old divider surface and it lead to crash due to it running animation before release. Actually, we cannot see divider animation in dismiss transition due to it didn't be added in transition root so its animation is invisible. So remove this didn't affect current dismiss animation. Fix: 287207156 Test: manual Test: pass existing tests Change-Id: I9c0cacfbd8df7deed5c2b028c1e2af9a0cac540a --- .../android/wm/shell/splitscreen/StageCoordinator.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java index 964ba9f9aa7c1..9ee1a901eacee 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java @@ -2530,8 +2530,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, // handling to the mixed-handler to deal with splitting it up. if (mMixedHandler.animatePendingSplitWithDisplayChange(transition, info, startTransaction, finishTransaction, finishCallback)) { - mSplitLayout.update(startTransaction); - startTransaction.apply(); + if (mSplitTransitions.isPendingResize(transition)) { + // Only need to update in resize because divider exist before transition. + mSplitLayout.update(startTransaction); + startTransaction.apply(); + } return true; } } @@ -2888,8 +2891,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, mSideStage.getSplitDecorManager().release(callbackT); callbackWct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token, false); }); - - addDividerBarToTransition(info, false /* show */); return true; }