Close gap between grid and clear all for expressive dismiss.

Fix: 397891454
Test: TaplTestsQuickstep#testDismissLastGridRow
Flag: com.android.launcher3.enable_expressive_dismiss_task_motion
Change-Id: Id49447819c38f307f05cd4ecc3d501bd51766443
This commit is contained in:
Pat Manning
2025-02-20 15:18:10 +00:00
parent e0221f0c8b
commit 2caae623a6
4 changed files with 50 additions and 8 deletions
@@ -38,6 +38,7 @@ import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAG
import static com.android.launcher3.Flags.enableAdditionalHomeAnimations;
import static com.android.launcher3.Flags.enableDesktopExplodedView;
import static com.android.launcher3.Flags.enableDesktopTaskAlphaAnimation;
import static com.android.launcher3.Flags.enableExpressiveDismissTaskMotion;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.Flags.enableLargeDesktopWindowingTile;
import static com.android.launcher3.Flags.enableRefactorTaskThumbnail;
@@ -3840,7 +3841,8 @@ public abstract class RecentsView<
newClearAllShortTotalWidthTranslation = expectedFirstTaskStart - firstTaskStart;
}
}
if (lastGridTaskView != null && lastGridTaskView.isVisibleToUser()) {
if (lastGridTaskView != null && (lastGridTaskView.isVisibleToUser() || (
enableExpressiveDismissTaskMotion() && 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.