Forcefully move focused task to front when triggering the recents animation in 3-button nav
Quickly tapping the recents button can start a recents animation while a quick switch is running. This causes the the wrong page index to be used as the focused task index.
Test: manual on large screen
Fixes: 227562351
Change-Id: If99f74477e52ed0c7f7c5fd7b3dc8b201627068b
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index dffdc5a..1e7e89e 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -235,6 +235,10 @@
}
};
+ RecentsView<?, ?> visibleRecentsView = activityInterface.getVisibleRecentsView();
+ if (visibleRecentsView != null) {
+ visibleRecentsView.moveFocusedTaskToFront();
+ }
if (mTaskAnimationManager.isRecentsAnimationRunning()) {
cmd.mActiveCallbacks = mTaskAnimationManager.continueRecentsAnimation(gestureState);
cmd.mActiveCallbacks.addListener(interactionHandler);