From a5960223cfc2e121f5abd3caa36806d003d74b1e Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 19 Nov 2021 19:33:54 +0000 Subject: [PATCH] Set sync applier on the transform params for the glued targets Bug: 199043513 Test: Swipe up with split task and scroll really quickly Change-Id: Ie10b27457903d8db4d4c973ab5b7e669da2c4998 --- .../android/quickstep/views/RecentsView.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index c0658519dc..017a3b8589 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -4357,15 +4357,22 @@ public abstract class RecentsView remoteTargetHandle - .getTransformParams().getTargetSet() - .addReleaseCheck(mSyncTransactionApplier)); - } + // Add release check to the targets from the RemoteTargetGluer and not the targets + // passed in because in the event we're in split screen, we use the passed in targets + // to create new RemoteAnimationTargets in assignTargetsForSplitScreen(), and the + // mSyncTransactionApplier doesn't get transferred over + runActionOnRemoteHandles(remoteTargetHandle -> { + final TransformParams params = remoteTargetHandle.getTransformParams(); + if (mSyncTransactionApplier != null) { + params.setSyncTransactionApplier(mSyncTransactionApplier); + params.getTargetSet().addReleaseCheck(mSyncTransactionApplier); + } + + TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator(); + tvs.setOrientationState(mOrientationState); + tvs.setDp(mActivity.getDeviceProfile()); + tvs.recentsViewScale.value = 1; + }); TaskView runningTaskView = getRunningTaskView(); if (runningTaskView instanceof GroupedTaskView) { @@ -4375,12 +4382,6 @@ public abstract class RecentsView