Pushing the startActivity before the calls to remove task.
- It appears that there is contention between startActivityAsUser() and removeTask() (called on two separate threads) which can cause jank when a user removes all the tasks from their recents list. This CL ensures that startActivityAsUser() is always run first so it is not blocked by the other call (which should be able to run in the background uninterrupted). Bug: 22760556 Change-Id: I7564a2f0e43414686419d3657379bbd0ca6b4152
This commit is contained in:
@@ -1121,9 +1121,6 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
||||
mViewPool.returnViewToPool(tv);
|
||||
}
|
||||
|
||||
// Notify the callback that we've removed the task and it can clean up after it
|
||||
mCb.onTaskViewDismissed(removedTask);
|
||||
|
||||
// Get the stack scroll of the task to anchor to (since we are removing something, the front
|
||||
// most task will be our anchor task)
|
||||
Task anchorTask = null;
|
||||
@@ -1172,6 +1169,11 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
||||
// Fade the dismiss button back in
|
||||
showDismissAllButton();
|
||||
}
|
||||
|
||||
// Notify the callback that we've removed the task and it can clean up after it. Note, we
|
||||
// do this after onAllTaskViewsDismissed() is called, to allow the home activity to be
|
||||
// started before the call to remove the task.
|
||||
mCb.onTaskViewDismissed(removedTask);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user