From 85f765908cdc1d956efd12bc5627d156d66f3671 Mon Sep 17 00:00:00 2001 From: Yunfan Chen Date: Tue, 2 May 2023 17:19:18 +0800 Subject: [PATCH] Collect change before starting transition With shell transition enabled, the previous implemented freeform and fullscreen change transition doesn't actually work. It is necessary to start collecting, making the server side change, before actually request starting the transition. Otherwise, the change cannot be calculated correctly with the necessary information. Bug: 279803578 Test: FreeformWindowingModeTests Change-Id: I9c25a6c30e1f5d39288d8ece4f0ca4982551d26a --- .../java/com/android/server/wm/ActivityClientController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/ActivityClientController.java b/services/core/java/com/android/server/wm/ActivityClientController.java index 8bbcd2787931c..3ecc8587441e7 100644 --- a/services/core/java/com/android/server/wm/ActivityClientController.java +++ b/services/core/java/com/android/server/wm/ActivityClientController.java @@ -1162,9 +1162,10 @@ class ActivityClientController extends IActivityClientController.Stub { } return; } + transition.collect(topFocusedRootTask); + executeMultiWindowFullscreenRequest(fullscreenRequest, topFocusedRootTask); r.mTransitionController.requestStartTransition(transition, topFocusedRootTask, null /* remoteTransition */, null /* displayChange */); - executeMultiWindowFullscreenRequest(fullscreenRequest, topFocusedRootTask); transition.setReady(topFocusedRootTask, true); }