From 9140af12d2dc2335cd76b9313cd1a41e7852376f Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Fri, 26 Feb 2021 14:11:45 -0800 Subject: [PATCH] Skip window transform if SwipePipToHomeAnimator's running Launcher tries to set the window transform on the recents animation leash when it's settled on end target, which might conflict with SwipePipToHomeAnimator and causes flash/flick at the end of the transition. Simply skip the window transform since SwipePipToHomeAnimator is the one solely responsible for updating the leash in this case. Bug: 179720719 Test: repeatedly enter PiP from ApiDemos with autoEnterPip enabled Change-Id: Ia98675c21e3bd898cd11cf6ed97f6eaadcb11a42 --- quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index feeee502de..7a259d4838 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1746,7 +1746,9 @@ public abstract class AbsSwipeUpHandler, Q extends if (mWindowTransitionController != null) { mWindowTransitionController.setProgress(mCurrentShift.value, mDragLengthFactor); } - if (mRecentsAnimationTargets != null) { + // No need to apply any transform if there is ongoing swipe-pip-to-home animator since + // that animator handles the leash solely. + if (mRecentsAnimationTargets != null && !mIsSwipingPipToHome) { if (mRecentsViewScrollLinked) { mTaskViewSimulator.setScroll(mRecentsView.getScrollOffset()); }