From 50aac992d8999766636f0de909bfa57ffaa731eb Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Mon, 10 Jul 2023 03:31:14 +0000 Subject: [PATCH] Fix mismatching surfaces position when entering split with two intents Updates the sequence of indicating side stage position in startIntents to make sure to use the same and the correct split position to update both window bounds and surface bounds. Bug: 290167860 Test: repro steps of the bug Change-Id: I299a5d6a7195c26a9caad904796e39c0db3113bf --- .../src/com/android/wm/shell/splitscreen/StageCoordinator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 acc1c5eb74b68..09affe1ced0c6 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 @@ -732,12 +732,12 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, mMainStage.activate(wct, false /* reparent */); } + setSideStagePosition(splitPosition, wct); mSplitLayout.setDivideRatio(splitRatio); updateWindowBounds(mSplitLayout, wct); wct.reorder(mRootTaskInfo.token, true); setRootForceTranslucent(false, wct); - setSideStagePosition(splitPosition, wct); options1 = options1 != null ? options1 : new Bundle(); addActivityOptions(options1, mSideStage); if (shortcutInfo1 != null) {