Merge "Prevent x-axis window movement during the initial swipe up to show transient taskbar" into tm-qpr-dev

This commit is contained in:
Jon Miranda
2022-11-19 01:58:37 +00:00
committed by Android (Google) Code Review
5 changed files with 55 additions and 0 deletions
@@ -755,6 +755,21 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
}
}
/**
* Sets whether or not we should clamp the scroll offset.
* This is used to avoid x-axis movement when swiping up transient taskbar.
* @param clampScrollOffset When true, we clamp the scroll to 0 before the clamp threshold is
* met.
*/
public void setClampScrollOffset(boolean clampScrollOffset) {
if (mRecentsView == null) {
mStateCallback.runOnceAtState(STATE_LAUNCHER_PRESENT,
() -> mRecentsView.setClampScrollOffset(clampScrollOffset));
return;
}
mRecentsView.setClampScrollOffset(clampScrollOffset);
}
public void setIsLikelyToStartNewTask(boolean isLikelyToStartNewTask) {
setIsLikelyToStartNewTask(
isLikelyToStartNewTask,