From 832f1781389328ee6d28bec0f3b159150e148f12 Mon Sep 17 00:00:00 2001 From: Pat Manning Date: Tue, 18 Mar 2025 12:23:42 +0000 Subject: [PATCH] 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 --- quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 8c7fe26f3c..e9b30c62c3 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -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