Merge "Prevent jumping to last grid task when not visible." into main

This commit is contained in:
Pat Manning
2025-03-18 11:22:34 -07:00
committed by Android (Google) Code Review
@@ -3943,7 +3943,7 @@ public abstract class RecentsView<
newClearAllShortTotalWidthTranslation = expectedFirstTaskStart - firstTaskStart;
}
}
if (lastGridTaskView != null && (lastGridTaskView.isVisibleToUser() || (
if (lastGridTaskView != null && (isTaskViewVisible(lastGridTaskView) || (
isExpressiveDismiss && lastGridTaskView == dismissedTaskView))) {
// After dismissal, animate translation of the remaining tasks to fill any gap left
// between the end of the grid and the clear all button. Only animate if the clear