Add missing overview state event to tests
This missing event was causing FallbackRecentsTest to fail when using the recents window
Flag: com.android.launcher3.enable_fallback_overview_in_window
Fixes: 380440464
Test: FallbackRecentsTest
Change-Id: I13a69e58811a14ffa88187acd42a1a12016d081d
diff --git a/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowManager.kt b/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowManager.kt
index e158975..86f9829 100644
--- a/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowManager.kt
+++ b/quickstep/src/com/android/quickstep/fallback/window/RecentsWindowManager.kt
@@ -36,11 +36,13 @@
import com.android.launcher3.LauncherAnimationRunner
import com.android.launcher3.LauncherAnimationRunner.RemoteAnimationFactory
import com.android.launcher3.R
+import com.android.launcher3.compat.AccessibilityManagerCompat
import com.android.launcher3.statehandlers.DesktopVisibilityController
import com.android.launcher3.statemanager.StateManager
import com.android.launcher3.statemanager.StateManager.AtomicAnimationFactory
import com.android.launcher3.statemanager.StatefulContainer
import com.android.launcher3.taskbar.TaskbarUIController
+import com.android.launcher3.testing.shared.TestProtocol.OVERVIEW_STATE_ORDINAL
import com.android.launcher3.util.ContextTracker
import com.android.launcher3.util.DisplayController
import com.android.launcher3.util.RunnableList
@@ -355,6 +357,9 @@
if (state == HOME || state == BG_LAUNCHER) {
cleanupRecentsWindow()
}
+ if (state === DEFAULT) {
+ AccessibilityManagerCompat.sendStateEventToTest(baseContext, OVERVIEW_STATE_ORDINAL)
+ }
}
private fun getStateName(state: RecentsState?): String {