Fixing index bounds exception when TaskViews are added while dismissing. am: ffaf07fed0
am: 0eb26d7e4b
Change-Id: Iffb6fc9ef928f0eb1b3b3bf99239cb6bee7997ab
This commit is contained in:
@@ -634,6 +634,12 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
|
||||
}
|
||||
|
||||
int taskIndex = mCurrentTasks.indexOf(task);
|
||||
if (taskIndex == -1) {
|
||||
// If a task was added to the stack view after the start of the dismiss gesture,
|
||||
// just ignore it
|
||||
continue;
|
||||
}
|
||||
|
||||
TaskViewTransform fromTransform = mCurrentTaskTransforms.get(taskIndex);
|
||||
TaskViewTransform toTransform = mFinalTaskTransforms.get(taskIndex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user