diff options
| author | Winson <winsonc@google.com> | 2015-08-06 16:46:01 -0700 |
|---|---|---|
| committer | Winson <winsonc@google.com> | 2015-08-10 15:45:35 -0700 |
| commit | 1df9c3c6bd985cf5819b6c1e9fb8ff096950dfa8 (patch) | |
| tree | b3dc05c3297a95c4188967091848254c7b8a728f | |
| parent | 69ed33087d77e32a1f1475adf00b9d87580960aa (diff) | |
| download | frameworks_base-1df9c3c6bd985cf5819b6c1e9fb8ff096950dfa8.zip frameworks_base-1df9c3c6bd985cf5819b6c1e9fb8ff096950dfa8.tar.gz frameworks_base-1df9c3c6bd985cf5819b6c1e9fb8ff096950dfa8.tar.bz2 | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java index abdebf3..0068f84 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java @@ -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 |
