Prevent quickscrub when swipe up has already started

Prevents quickscrub from starting when launcher sends the recents
started event to systemui.

Bug: 73351745
Test: manual - swipe up a little from left of home button and
immediately swipe right to start quickscrub

Change-Id: If72275ce591e80d85d8d89e6e0baf7e733d5cb1c
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickScrubController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickScrubController.java
index 378858a..dc0ea1c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickScrubController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickScrubController.java
@@ -75,6 +75,7 @@
     private boolean mDraggingActive;
     private boolean mQuickScrubActive;
     private boolean mAllowQuickSwitch;
+    private boolean mRecentsAnimationStarted;
     private float mDownOffset;
     private float mTranslation;
     private int mTouchDownX;
@@ -279,7 +280,7 @@
                     }
 
                     // Control the button movement
-                    if (!mDraggingActive && exceededTouchSlop) {
+                    if (!mDraggingActive && exceededTouchSlop && !mRecentsAnimationStarted) {
                         boolean allowDrag = !mDragPositive
                                 ? offset < 0 && pos < touchDown : offset >= 0 && pos > touchDown;
                         if (allowDrag) {
@@ -417,6 +418,13 @@
         mDraggingActive = false;
     }
 
+    public void setRecentsAnimationStarted(boolean started) {
+        mRecentsAnimationStarted = started;
+        if (started) {
+            cancelQuickSwitch();
+        }
+    }
+
     public void cancelQuickSwitch() {
         mAllowQuickSwitch = false;
         mHandler.removeCallbacks(mLongPressRunnable);