Updating SurfaceTransactionApplier to handle view not being attached

Bug: 278833389
Test: Presubmit
Flag: N/A
Change-Id: I88c240a1a7bdfe2e68c858c30e91cc5d06bc7bcf
This commit is contained in:
Sunny Goyal
2023-05-05 15:56:39 -07:00
parent 2e17bcaa0b
commit 63cf4d07a8
2 changed files with 39 additions and 42 deletions
@@ -2114,12 +2114,11 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
}
protected void linkRecentsViewScroll() {
SurfaceTransactionApplier.create(mRecentsView, applier -> {
runActionOnRemoteHandles(remoteTargetHandle -> remoteTargetHandle.getTransformParams()
.setSyncTransactionApplier(applier));
runOnRecentsAnimationAndLauncherBound(() ->
mRecentsAnimationTargets.addReleaseCheck(applier));
});
SurfaceTransactionApplier applier = new SurfaceTransactionApplier(mRecentsView);
runActionOnRemoteHandles(remoteTargetHandle -> remoteTargetHandle.getTransformParams()
.setSyncTransactionApplier(applier));
runOnRecentsAnimationAndLauncherBound(() ->
mRecentsAnimationTargets.addReleaseCheck(applier));
mRecentsView.addOnScrollChangedListener(mOnRecentsScrollListener);
runOnRecentsAnimationAndLauncherBound(() ->