diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java index 3b7ad3e618..de42669000 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java @@ -299,10 +299,6 @@ public final class KeyboardQuickSwitchController implements return; } mQuickSwitchViewController.closeQuickSwitchView(animate); - if (mOnClosed != null) { - mOnClosed.run(); - mOnClosed = null; - } } /** @@ -394,6 +390,13 @@ public final class KeyboardQuickSwitchController implements }); } + 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 985cc26d8e..e623b21bb9 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchViewController.java @@ -198,6 +198,7 @@ public class KeyboardQuickSwitchViewController { // Let currently-running animation finish. return; } + mControllerCallbacks.onCloseStarted(); if (!animate) { InteractionJankMonitorWrapper.begin( mKeyboardQuickSwitchView, Cuj.CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE);