Merge "Add flag to gate checking last task visibility on dismiss." into main

This commit is contained in:
Treehugger Robot
2025-03-20 00:36:11 -07:00
committed by Android (Google) Code Review
@@ -3943,8 +3943,10 @@ public abstract class RecentsView<
newClearAllShortTotalWidthTranslation = expectedFirstTaskStart - firstTaskStart;
}
}
if (lastGridTaskView != null && (isTaskViewVisible(lastGridTaskView) || (
isExpressiveDismiss && lastGridTaskView == dismissedTaskView))) {
if (lastGridTaskView != null && (
(!isExpressiveDismiss && lastGridTaskView.isVisibleToUser()) || (isExpressiveDismiss
&& (isTaskViewVisible(lastGridTaskView)
|| 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
// all button is visible or would become visible after dismissal.