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
This commit is contained in:
parent
6547721d8c
commit
a5960223cf
|
@ -4357,15 +4357,22 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|||
RemoteTargetGluer gluer = new RemoteTargetGluer(getContext(), getSizeStrategy());
|
||||
mRemoteTargetHandles = gluer.assignTargetsForSplitScreen(recentsAnimationTargets);
|
||||
mSplitBoundsConfig = gluer.getStagedSplitBounds();
|
||||
if (mSyncTransactionApplier != null) {
|
||||
// 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 -> 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<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|||
// notified.
|
||||
((GroupedTaskView) runningTaskView).updateSplitBoundsConfig(mSplitBoundsConfig);
|
||||
}
|
||||
for (RemoteTargetHandle remoteTargetHandle : mRemoteTargetHandles) {
|
||||
TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
|
||||
tvs.setOrientationState(mOrientationState);
|
||||
tvs.setDp(mActivity.getDeviceProfile());
|
||||
tvs.recentsViewScale.value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/** Helper to avoid writing some for-loops to iterate over {@link #mRemoteTargetHandles} */
|
||||
|
|
Loading…
Reference in New Issue