Only restore previous currentPage in applyLoadPlan if mCurrentPage is outdated am: f0b8ef9dfd

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15736956

Change-Id: I03350faefc6da9545c57b282bc7c2f67f3b87741
This commit is contained in:
Alex Chau
2021-09-01 17:24:33 +00:00
committed by Automerger Merge Worker
@@ -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);
}
}
}