Merge "Check if running task is null in onPrepareGestureEndAnimation" into sc-v2-dev

This commit is contained in:
Alex Chau
2021-07-20 20:09:28 +00:00
committed by Android (Google) Code Review
@@ -1792,7 +1792,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
.displayOverviewTasksAsGrid(mActivity.getDeviceProfile())) {
TaskView runningTaskView = getRunningTaskView();
float runningTaskPrimaryGridTranslation = 0;
if (indexOfChild(runningTaskView) != getNextPage()) {
if (runningTaskView != null && indexOfChild(runningTaskView) != getNextPage()) {
// Apply the gird translation to running task unless it's being snapped to.
runningTaskPrimaryGridTranslation = mOrientationHandler.getPrimaryValue(
runningTaskView.getGridTranslationX(),