diff --git a/quickstep/src/com/android/quickstep/AllAppsActionManager.kt b/quickstep/src/com/android/quickstep/AllAppsActionManager.kt index 2d179f95df..51a68d16da 100644 --- a/quickstep/src/com/android/quickstep/AllAppsActionManager.kt +++ b/quickstep/src/com/android/quickstep/AllAppsActionManager.kt @@ -119,6 +119,7 @@ class AllAppsActionManager( context .getSystemService(AccessibilityManager::class.java) ?.unregisterSystemAction(GLOBAL_ACTION_ACCESSIBILITY_ALL_APPS) + quickstepKeyGestureEventsManager.unregisterAllAppsKeyGestureEvent() SettingsCache.INSTANCE[context].unregister( USER_SETUP_COMPLETE_URI, onSettingsChangeListener, diff --git a/quickstep/tests/multivalentTests/src/com/android/quickstep/AllAppsActionManagerTest.kt b/quickstep/tests/multivalentTests/src/com/android/quickstep/AllAppsActionManagerTest.kt index b9e52092c6..acfa9b40eb 100644 --- a/quickstep/tests/multivalentTests/src/com/android/quickstep/AllAppsActionManagerTest.kt +++ b/quickstep/tests/multivalentTests/src/com/android/quickstep/AllAppsActionManagerTest.kt @@ -172,6 +172,13 @@ class AllAppsActionManagerTest { assertThat(allAppsActionManager.isActionRegistered).isTrue() verify(quickstepKeyGestureEventsManager).registerAllAppsKeyGestureEvent(any()) } + + @Test + fun onDestroy_shouldUnregisterAllAppsKeyGestureHandler() { + allAppsActionManager.onDestroy() + + verify(quickstepKeyGestureEventsManager).unregisterAllAppsKeyGestureEvent() + } } @LauncherAppSingleton