Prevent jumping to last grid task when not visible.

Fix: 404203362
Test: Manual. Open 9 apps, dismiss all bottom grid tasks, dismiss first top task, observe no jump.
Flag: com.android.launcher3.enable_expressive_dismiss_task_motion
Change-Id: I11058b90b7d8c90256329849554886d652624926
This commit is contained in:
Pat Manning
2025-03-18 12:23:42 +00:00
parent ffde6fdec8
commit 832f178138
@@ -3937,7 +3937,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