launcher: check if task still exists before leaving it in focus
Fixes 191353942 Test: manually; check buganizer on how to reproduce Change-Id: Ia75ff59b5a9ef5654747d445df4088a5b17f6a42
This commit is contained in:
@@ -1159,7 +1159,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();
|
||||
|
||||
Reference in New Issue
Block a user