Merge "Snap to task from other grid row if dismissing non-snapped focused task and not enough tasks remain in current grid row to snap to." into sc-v2-dev

This commit is contained in:
TreeHugger Robot
2021-09-06 16:16:00 +00:00
committed by Android (Google) Code Review

View File

@@ -3000,6 +3000,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
: getBottomRowIdArray();
int snappedIndex = taskViewIdArray.indexOf(snappedTaskViewId);
taskViewIdArray.removeValue(dismissedTaskViewId);
if (finalNextFocusedTaskView != null) {
taskViewIdArray.removeValue(
finalNextFocusedTaskView.getTaskViewId());
}
if (snappedIndex < taskViewIdArray.size()) {
taskViewIdToSnapTo = taskViewIdArray.get(snappedIndex);
} else if (snappedIndex == taskViewIdArray.size()) {
@@ -3088,7 +3092,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
}
setCurrentPage(pageToSnapTo);
// Update various scroll depedent UI.
// Update various scroll-dependent UI.
dispatchScrollChanged();
updateActionsViewFocusedScroll();
if (isClearAllHidden()) {