From 716affdba632865b520d5b53fbb5db0f7b44feb7 Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Thu, 22 Apr 2021 11:13:18 -0700 Subject: [PATCH] Comply with the IRecentsAnimationController change Bug: 184789412 Bug: 185509920 Test: m -j Change-Id: I11c7e4988d958ddaa63d9750ec65ee27030322c0 --- .../com/android/quickstep/AbsSwipeUpHandler.java | 3 +-- .../quickstep/RecentsAnimationController.java | 13 +++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 75992342aa..12f9a9646d 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1497,9 +1497,8 @@ public abstract class AbsSwipeUpHandler, SystemUiProxy.INSTANCE.get(mContext).stopSwipePipToHome( mSwipePipToHomeAnimator.getComponentName(), mSwipePipToHomeAnimator.getDestinationBounds()); - mRecentsAnimationController.setFinishTaskBounds( + mRecentsAnimationController.setFinishTaskTransaction( mSwipePipToHomeAnimator.getTaskId(), - mSwipePipToHomeAnimator.getDestinationBounds(), mSwipePipToHomeAnimator.getFinishTransaction()); mIsSwipingPipToHome = false; } diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationController.java b/quickstep/src/com/android/quickstep/RecentsAnimationController.java index 82e8a9304c..456073596a 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationController.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationController.java @@ -19,7 +19,6 @@ import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.Executors.THREAD_POOL_EXECUTOR; import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; -import android.graphics.Rect; import android.window.PictureInPictureSurfaceTransaction; import androidx.annotation.NonNull; @@ -145,18 +144,16 @@ public class RecentsAnimationController { } /** - * Sets the final bounds on a Task. This is used by Launcher to notify the system that - * animating Activity to PiP has completed and the associated task surface should be updated - * accordingly. This should be called before `finish` + * Sets the final surface transaction on a Task. This is used by Launcher to notify the system + * that animating Activity to PiP has completed and the associated task surface should be + * updated accordingly. This should be called before `finish` * @param taskId for which the leash should be updated - * @param destinationBounds bounds of the final PiP window * @param finishTransaction leash operations for the final transform. */ - public void setFinishTaskBounds(int taskId, Rect destinationBounds, + public void setFinishTaskTransaction(int taskId, PictureInPictureSurfaceTransaction finishTransaction) { UI_HELPER_EXECUTOR.execute( - () -> mController.setFinishTaskBounds(taskId, destinationBounds, - finishTransaction)); + () -> mController.setFinishTaskTransaction(taskId, finishTransaction)); } /**