From 617f9fae3de4016443ee75bfcdb82c1757ab5c3f Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Mon, 23 May 2022 10:11:53 -0700 Subject: [PATCH] Avoiding updating task via scroll if RectF spring animation is running Bug: 231333965 Test: Verified no update at the end of home transition Change-Id: I2a106f4d7661f9d409425ce2ed755e74e1abe14b --- .../src/com/android/quickstep/AbsSwipeUpHandler.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 21728ad9cb..d676f7d195 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1996,9 +1996,11 @@ public abstract class AbsSwipeUpHandler, * Applies the transform on the recents animation */ protected void applyScrollAndTransform() { - // No need to apply any transform if there is ongoing swipe-pip-to-home animator since - // that animator handles the leash solely. - boolean notSwipingPipToHome = mRecentsAnimationTargets != null && !mIsSwipingPipToHome; + // No need to apply any transform if there is ongoing swipe-to-home animator + // swipe-to-pip handles the leash solely + // swipe-to-icon animation is handled by RectFSpringAnim anim + boolean notSwipingToHome = mRecentsAnimationTargets != null + && mGestureState.getEndTarget() != HOME; boolean setRecentsScroll = mRecentsViewScrollLinked && mRecentsView != null; for (RemoteTargetHandle remoteHandle : mRemoteTargetHandles) { AnimatorControllerWithResistance playbackController = @@ -2008,7 +2010,7 @@ public abstract class AbsSwipeUpHandler, getScaleProgressDueToScroll()), mDragLengthFactor); } - if (notSwipingPipToHome) { + if (notSwipingToHome) { TaskViewSimulator taskViewSimulator = remoteHandle.getTaskViewSimulator(); if (setRecentsScroll) { taskViewSimulator.setScroll(mRecentsView.getScrollOffset());