summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jerry Chang <chenghsiuchang@google.com> 2022-09-06 07:33:56 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-09-06 07:33:56 +0000
commitd2b00b70c74c2b48d8911a8aec6340813f0edb24 (patch)
tree8046fa471ad035a3acd08147fcabc536a66c9b58
parent60f1dbd7945413c53cf2ccbd7f1c49b063054475 (diff)
parentd64db8b5a68f16efa6dd3170429328538babc390 (diff)
Merge "Fix no response after entered split screen" into tm-qpr-dev am: d64db8b5a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19837470 Change-Id: I326669a59587fe80bdc493f240fe14db8dc6d974 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java19
1 files changed, 9 insertions, 10 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 8d405f4f6fcf..199007d7f577 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
@@ -589,17 +589,17 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
return;
}
- // The surfaces of splitting tasks were placed with window bounds when preparing the
- // transition, so update divider surface separately.
- final RemoteAnimationTarget dividerTarget = getDividerBarLegacyTarget();
- mSplitLayout.getRefDividerBounds(mTempRect1);
- t.setLayer(dividerTarget.leash, Integer.MAX_VALUE)
- .setPosition(dividerTarget.leash, mTempRect1.left, mTempRect1.top);
- setDividerVisibility(true, t);
+ // Wrap the divider bar into non-apps target to animate together.
+ nonApps = ArrayUtils.appendElement(RemoteAnimationTarget.class, nonApps,
+ getDividerBarLegacyTarget());
+ updateSurfaceBounds(mSplitLayout, t, false);
+ setDividerVisibility(true, t);
for (int i = 0; i < apps.length; ++i) {
if (apps[i].mode == MODE_OPENING) {
t.show(apps[i].leash);
+ // Reset the surface position of the opening app to prevent double-offset.
+ t.setPosition(apps[i].leash, 0, 0);
}
}
t.apply();
@@ -614,9 +614,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
};
Transitions.setRunningRemoteTransitionDelegate(adapter.getCallingApplication());
try {
- adapter.getRunner().onAnimationStart(transit, apps, wallpapers,
- ArrayUtils.appendElement(RemoteAnimationTarget.class, nonApps,
- dividerTarget), wrapCallback);
+ adapter.getRunner().onAnimationStart(
+ transit, apps, wallpapers, nonApps, wrapCallback);
} catch (RemoteException e) {
Slog.e(TAG, "Error starting remote animation", e);
}