Merge "Revert "Fix case of gesture being stuck when the Launcher is stopped mid-gesture"" into tm-qpr-dev am: d859a20086

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20028589

Change-Id: Iede5e3cd5e207b0ca4ee688a8ae4660726d6b0c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Winson Chung
2022-09-23 05:01:06 +00:00
committed by Automerger Merge Worker

View File

@@ -1140,13 +1140,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
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<T extends StatefulActivity<S>,
// 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(