Merge "launcher: check if task still exists before leaving it in focus" into sc-v2-dev am: 03f0c67420

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

Change-Id: Ida8a2d63d6570812555ad55155e9e6111dd06377
This commit is contained in:
Thales Lima
2021-07-14 10:09:54 +00:00
committed by Automerger Merge Worker

View File

@@ -1158,7 +1158,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
final TaskView taskView = (TaskView) getChildAt(pageIndex);
taskView.bind(task, mOrientationState);
}
if (mFocusedTaskId == -1 && getTaskViewCount() > 0) {
// If the list changed, maybe the focused task doesn't exist anymore
if (getFocusedTaskView() == null && getTaskViewCount() > 0) {
mFocusedTaskId = getTaskViewAt(0).getTaskId();
}
updateTaskSize();