Snap to Large tile or first grid task when they are the next page.

Fix: 398232493
Fix: 399622012
Test: Manual
Flag: com.android.launcher3.enable_expressive_dismiss_task_motion
Change-Id: I10cbd303b3e36059a41cb4ff7fdb4b4af7f93f23
This commit is contained in:
Pat Manning
2025-03-25 12:44:35 +00:00
parent 5ff3717c6f
commit b147f6f4b7
2 changed files with 6 additions and 29 deletions
@@ -1825,11 +1825,13 @@ public abstract class RecentsView<
return;
}
TaskView taskView = getTaskViewAt(mNextPage);
boolean shouldSnapToLargeTask = taskView != null && taskView.isLargeTile()
&& !mUtils.isAnySmallTaskFullyVisible();
boolean shouldSnapToLargeTask = taskView != null && taskView.isLargeTile();
boolean shouldSnapToSmallTask = enableGridOnlyOverview() && taskView != null
&& taskView == mUtils.getFirstSmallTaskView();
boolean shouldSnapToClearAll = mNextPage == indexOfChild(mClearAllButton);
// Snap to large tile when grid tasks aren't fully visible or the clear all button.
if (!shouldSnapToLargeTask && !shouldSnapToClearAll) {
boolean shouldSnap =
shouldSnapToLargeTask || shouldSnapToClearAll || shouldSnapToSmallTask;
if (!shouldSnap) {
return;
}
}