Snap for 11494049 from e98d88ef2f to 24Q3-release

Change-Id: I60074400dff40bb9c6010bf5383cd985ce0385f7
This commit is contained in:
Android Build Coastguard Worker
2024-02-24 22:20:48 +00:00
2 changed files with 5 additions and 3 deletions
@@ -650,10 +650,13 @@ public class QuickstepLauncher extends Launcher {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Back dispatcher is registered in {@link BaseActivity#onCreate}. For predictive back to
// work, we must opt-in BEFORE registering back dispatcher. So we need to call
// setEnableOnBackInvokedCallback() before super.onCreate()
if (Utilities.ATLEAST_U && enablePredictiveBackGesture()) {
getApplicationInfo().setEnableOnBackInvokedCallback(true);
}
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
mPendingSplitSelectInfo = ObjectWrapper.unwrap(
savedInstanceState.getIBinder(PENDING_SPLIT_SELECT_INFO));
@@ -324,12 +324,12 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
@Override
public void onDragEnd(PointF velocity) {
cancelAnimations();
boolean horizontalFling = mSwipeDetector.isFling(velocity.x);
boolean verticalFling = mSwipeDetector.isFling(velocity.y);
boolean noFling = !horizontalFling && !verticalFling;
if (mMotionPauseDetector.isPaused() && noFling) {
// Going to Overview.
cancelAnimations();
InteractionJankMonitorWrapper.cancel(Cuj.CUJ_LAUNCHER_QUICK_SWITCH);
StateAnimationConfig config = new StateAnimationConfig();
@@ -455,7 +455,6 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
nonOverviewAnim.setDuration(Math.max(xDuration, yDuration));
mNonOverviewAnim.setEndAction(() -> onAnimationToStateCompleted(targetState));
cancelAnimations();
xOverviewAnim.start();
yOverviewAnim.start();
nonOverviewAnim.start();