Fix the overflow button getting stuck in the dot position

The root cause was that there were other unaccounted code paths inside
`KeyboardQuickSwitchViewController` that were causing the KQS view
to be closed.

The fix introduces a new `onCloseStarted` callback that is called before
closing the KQS view. This allows to toggle the overflow button together
with the KQS closing animation (in case it closes with animation).

Bug: 379614917
Flag: com.android.launcher3.taskbar_overflow
Test: manual, following steps in the bug
Change-Id: I1868142c1cdba8111cb86c4c54e5b12b643732c5
diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java
index 3b7ad3e..de42669 100644
--- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java
@@ -299,10 +299,6 @@
             return;
         }
         mQuickSwitchViewController.closeQuickSwitchView(animate);
-        if (mOnClosed != null) {
-            mOnClosed.run();
-            mOnClosed = null;
-        }
     }
 
     /**
@@ -394,6 +390,13 @@
             });
         }
 
+        void onCloseStarted() {
+            if (mOnClosed != null) {
+                mOnClosed.run();
+                mOnClosed = null;
+            }
+        }
+
         void onCloseComplete() {
             if (Flags.taskbarOverflow() && mOverlayContext != null) {
                 mOverlayContext.getDragLayer()
diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java
index 985cc26..e623b21 100644
--- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java
@@ -198,6 +198,7 @@
             // Let currently-running animation finish.
             return;
         }
+        mControllerCallbacks.onCloseStarted();
         if (!animate) {
             InteractionJankMonitorWrapper.begin(
                     mKeyboardQuickSwitchView, Cuj.CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE);