From 3fca6aaec2883c4bb3108fc272589d8f89b59ba0 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 19 Jul 2019 16:48:55 -0700 Subject: [PATCH] Finish recents animation when touching during animation to recents This regressed in ag/8542000, where we cancel the animation instead of ending it. We should only cancel when going to home; in other cases, we should still call end(). Bug: 137487381 Change-Id: I093954908c3ac747ec3132aa700c8be2f927631a --- .../android/quickstep/WindowTransformSwipeHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java index df37759cc4..cc9719b418 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java @@ -56,6 +56,9 @@ import android.view.ViewTreeObserver.OnDrawListener; import android.view.WindowInsets; import android.view.animation.Interpolator; +import androidx.annotation.NonNull; +import androidx.annotation.UiThread; + import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; @@ -88,9 +91,6 @@ import com.android.systemui.shared.system.LatencyTrackerCompat; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.WindowCallbacksCompat; -import androidx.annotation.NonNull; -import androidx.annotation.UiThread; - @TargetApi(Build.VERSION_CODES.O) public class WindowTransformSwipeHandler extends BaseSwipeUpHandler @@ -677,7 +677,7 @@ public class WindowTransformSwipeHandler @Override protected InputConsumer createNewInputProxyHandler() { - endRunningWindowAnim(true /* cancel */); + endRunningWindowAnim(mGestureEndTarget == HOME /* cancel */); endLauncherTransitionController(); if (!ENABLE_QUICKSTEP_LIVE_TILE.get()) { // Hide the task view, if not already hidden