Merge "Enable free scroll immediately if gesture goes to overview" into sc-dev
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 99ac32a..2242168 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -1378,7 +1378,6 @@
private void invalidateHandlerWithLauncher() {
endLauncherTransitionController();
- mRecentsView.removeOnScrollChangedListener(mOnRecentsScrollListener);
mRecentsView.onGestureAnimationEnd();
resetLauncherListeners();
}
@@ -1393,12 +1392,18 @@
}
}
+ /**
+ * Unlike invalidateHandlerWithLauncher, this is called even when switching consumers, e.g. on
+ * continued quick switch gesture, which cancels the previous handler but doesn't invalidate it.
+ */
private void resetLauncherListeners() {
// Reset the callback for deferred activity launches
if (!LIVE_TILE.get()) {
mActivityInterface.setOnDeferredActivityLaunchCallback(null);
}
mActivity.getRootView().setOnApplyWindowInsetsListener(null);
+
+ mRecentsView.removeOnScrollChangedListener(mOnRecentsScrollListener);
}
private void resetStateForAnimationCancel() {