diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 24bb393f0f..4e635a7643 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1140,13 +1140,6 @@ public abstract class AbsSwipeUpHandler, boolean isCancel) { long duration = MAX_SWIPE_DURATION; float currentShift = mCurrentShift.value; - boolean recentsVisible = mRecentsView != null - && (mRecentsView.getWindowVisibility() == View.VISIBLE); - if (!recentsVisible) { - // We've hit a case where Launcher is been stopped mid-gesture, in this case, force - // a LAST_TASK end target - isCancel = true; - } final GestureEndTarget endTarget = calculateEndTarget(velocity, endVelocity, isFling, isCancel); // Set the state, but don't notify until the animation completes @@ -1226,7 +1219,7 @@ public abstract class AbsSwipeUpHandler, // Let RecentsView handle the scrolling to the task, which we launch in startNewTask() // or resumeLastTask(). - if (recentsVisible) { + if (mRecentsView != null) { ActiveGestureLog.INSTANCE.trackEvent(ActiveGestureErrorDetector.GestureEvent .SET_ON_PAGE_TRANSITION_END_CALLBACK); mRecentsView.setOnPageTransitionEndCallback(