Merge "Remove mOnRecentsScrollListener when continuing quick switch gesture" into sc-dev am: 1eea52296b am: 7cd6c3b936

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

Change-Id: I0cdb408d12218c5f2aeb99a086b666b771bc596b
This commit is contained in:
Tony Wickham
2021-05-13 20:01:25 +00:00
committed by Automerger Merge Worker

View File

@@ -1378,7 +1378,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
private void invalidateHandlerWithLauncher() {
endLauncherTransitionController();
mRecentsView.removeOnScrollChangedListener(mOnRecentsScrollListener);
mRecentsView.onGestureAnimationEnd();
resetLauncherListeners();
}
@@ -1393,12 +1392,18 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
}
}
/**
* 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() {