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
This commit is contained in:
Schneider Victor-tulias
2022-06-09 11:24:17 -07:00
parent 863ebce70b
commit 920a86969a

View File

@@ -235,6 +235,10 @@ public class OverviewCommandHelper {
}
};
RecentsView<?, ?> visibleRecentsView = activityInterface.getVisibleRecentsView();
if (visibleRecentsView != null) {
visibleRecentsView.moveFocusedTaskToFront();
}
if (mTaskAnimationManager.isRecentsAnimationRunning()) {
cmd.mActiveCallbacks = mTaskAnimationManager.continueRecentsAnimation(gestureState);
cmd.mActiveCallbacks.addListener(interactionHandler);