Merge "Close gap between grid and clear all for expressive dismiss." into main

This commit is contained in:
Treehugger Robot
2025-02-21 04:01:11 -08:00
committed by Android (Google) Code Review
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;
@@ -3854,7 +3855,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.