Reland slow gesture callback handling

Now that b/329324086 has been fixed, we can be more certain that launcher always gets a signal to clean up from WM.

- Relanding original fix for b/285636175 with some additional error checking
- We will now check whether the recents animation start is pending on ACTION_UP
- We will now block entire swipes to prevent sending additional inputs an input consumer while the recents animation start is pending
- We will now only stop blocking inputs on ACTION_DOWN

Flag: LEGACY ENABLE_HANDLE_DELAYED_GESTURE_CALLBACKS TEAMFOOD
Bug: 329324927
Fixes: 285636175
Test: added a delay in RecentsAnimationCallbacks.onAnimationStart and attempted several rapid gestures
Change-Id: I9805114da34bf44e6b28c2a8a665e4cca88904c2
diff --git a/aconfig/launcher.aconfig b/aconfig/launcher.aconfig
index 8274bd6..6b07bb6 100644
--- a/aconfig/launcher.aconfig
+++ b/aconfig/launcher.aconfig
@@ -229,3 +229,13 @@
     description: "Enables an add button in the widget picker"
     bug: "323886237"
 }
+
+flag {
+  name: "enable_handle_delayed_gesture_callbacks"
+  namespace: "launcher"
+  description: "Enables additional handling for delayed mid-gesture callbacks"
+  bug: "285636175"
+  metadata {
+    purpose: PURPOSE_BUGFIX
+  }
+}