Merge "Restore previous currentPage in applyLoadPlan in case task is re-ordered" into sc-dev am: 679f8bb9ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15175270 Change-Id: I409622ab04cc934290013203281329987e0ae5ec
This commit is contained in:
@@ -1087,6 +1087,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int currentTaskId = -1;
|
||||||
|
TaskView currentTaskView = getTaskViewAtByAbsoluteIndex(mCurrentPage);
|
||||||
|
if (currentTaskView != null) {
|
||||||
|
currentTaskId = currentTaskView.getTask().key.id;
|
||||||
|
}
|
||||||
|
|
||||||
// Unload existing visible task data
|
// Unload existing visible task data
|
||||||
unloadVisibleTaskData(TaskView.FLAG_UPDATE_ALL);
|
unloadVisibleTaskData(TaskView.FLAG_UPDATE_ALL);
|
||||||
|
|
||||||
@@ -1126,6 +1132,11 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
|||||||
} else if (getTaskViewCount() > 0) {
|
} else if (getTaskViewCount() > 0) {
|
||||||
setCurrentPage(indexOfChild(getTaskViewAt(0)));
|
setCurrentPage(indexOfChild(getTaskViewAt(0)));
|
||||||
}
|
}
|
||||||
|
} else if (currentTaskId != -1) {
|
||||||
|
currentTaskView = getTaskView(currentTaskId);
|
||||||
|
if (currentTaskView != null) {
|
||||||
|
setCurrentPage(indexOfChild(currentTaskView));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIgnoreResetTaskId != -1 && getTaskView(mIgnoreResetTaskId) != ignoreResetTaskView) {
|
if (mIgnoreResetTaskId != -1 && getTaskView(mIgnoreResetTaskId) != ignoreResetTaskView) {
|
||||||
|
|||||||
Reference in New Issue
Block a user