Fix crash when user is both scrolling and tabbing through Recents. (Bug 18552776)
This commit is contained in:
@@ -530,11 +530,12 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
||||
|
||||
/** Resets the focused task. */
|
||||
void resetFocusedTask() {
|
||||
if ((mStack != null) && (0 <= mFocusedTaskIndex) &&
|
||||
(mFocusedTaskIndex < mStack.getTaskCount())) {
|
||||
if ((0 <= mFocusedTaskIndex) && (mFocusedTaskIndex < mStack.getTaskCount())) {
|
||||
Task t = mStack.getTasks().get(mFocusedTaskIndex);
|
||||
TaskView tv = getChildViewForTask(t);
|
||||
tv.unsetFocusedTask();
|
||||
if (tv != null) {
|
||||
tv.unsetFocusedTask();
|
||||
}
|
||||
}
|
||||
mFocusedTaskIndex = -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user