Loading quickstep/src/com/android/quickstep/views/RecentsView.java +11 −4 Original line number Diff line number Diff line Loading @@ -1396,7 +1396,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T // Removing views sets the currentPage to 0, so we save this and restore it after // the new set of views are added int previousPage = mCurrentPage; int previousCurrentPage = mCurrentPage; removeAllViews(); // Add views as children based on whether it's grouped or single task Loading @@ -1420,7 +1420,14 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T if (!taskGroups.isEmpty()) { addView(mClearAllButton); } setCurrentPage(previousPage); boolean settlingOnNewTask = mNextPage != INVALID_PAGE; if (settlingOnNewTask) { // Restore mCurrentPage but don't call setCurrentPage() as that clobbers the scroll. mCurrentPage = previousCurrentPage; } else { setCurrentPage(previousCurrentPage); } // Keep same previous focused task TaskView newFocusedTaskView = getTaskViewByTaskId(focusedTaskId); Loading @@ -1446,7 +1453,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } int targetPage = -1; if (mNextPage == INVALID_PAGE) { if (!settlingOnNewTask) { // Set the current page to the running task, but not if settling on new task. if (runningTaskId != -1) { targetPage = indexOfChild(newRunningTaskView); Loading Loading @@ -2254,7 +2261,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T updateChildTaskOrientations(); // Reload the task list mTaskListChangeId = mModel.getTasks(this::applyLoadPlan); reloadIfNeeded(); } /** Loading Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +11 −4 Original line number Diff line number Diff line Loading @@ -1396,7 +1396,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T // Removing views sets the currentPage to 0, so we save this and restore it after // the new set of views are added int previousPage = mCurrentPage; int previousCurrentPage = mCurrentPage; removeAllViews(); // Add views as children based on whether it's grouped or single task Loading @@ -1420,7 +1420,14 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T if (!taskGroups.isEmpty()) { addView(mClearAllButton); } setCurrentPage(previousPage); boolean settlingOnNewTask = mNextPage != INVALID_PAGE; if (settlingOnNewTask) { // Restore mCurrentPage but don't call setCurrentPage() as that clobbers the scroll. mCurrentPage = previousCurrentPage; } else { setCurrentPage(previousCurrentPage); } // Keep same previous focused task TaskView newFocusedTaskView = getTaskViewByTaskId(focusedTaskId); Loading @@ -1446,7 +1453,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } int targetPage = -1; if (mNextPage == INVALID_PAGE) { if (!settlingOnNewTask) { // Set the current page to the running task, but not if settling on new task. if (runningTaskId != -1) { targetPage = indexOfChild(newRunningTaskView); Loading Loading @@ -2254,7 +2261,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T updateChildTaskOrientations(); // Reload the task list mTaskListChangeId = mModel.getTasks(this::applyLoadPlan); reloadIfNeeded(); } /** Loading