Only restore previous currentPage in applyLoadPlan if mCurrentPage is outdated

Bug: 197493120
Test: manual
Change-Id: I196088c848f9fa8ec23f6c803226d674ba3e088b
This commit is contained in:
Alex Chau
2021-09-01 15:10:37 +01:00
parent 125158232e
commit f0b8ef9dfd

View File

@@ -1367,7 +1367,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
} else if (currentTaskId != -1) {
currentTaskView = getTaskViewByTaskId(currentTaskId);
if (currentTaskView != null) {
setCurrentPage(indexOfChild(currentTaskView));
int currentTaskViewIndex = indexOfChild(currentTaskView);
if (mCurrentPage != currentTaskViewIndex) {
setCurrentPage(currentTaskViewIndex);
}
}
}