diff options
| author | 2021-12-10 18:40:33 +0000 | |
|---|---|---|
| committer | 2021-12-10 18:40:33 +0000 | |
| commit | 3a6d055ee60ba6c4895fc22cb02c2b5b504d347c (patch) | |
| tree | fe05b7d4d85b1a31b2ff09f9bdd5fc1710860ac9 | |
| parent | ac5575654b0f0826418b754063b1e06e079c1ee2 (diff) | |
| parent | 02ab472cbc375f1ac91318ed1307b8e152a1d572 (diff) | |
Merge "Remove unnecessary clean up of targets" into sc-v2-dev am: e59a4fee55 am: 02ab472cbc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16426823
Change-Id: I62b3e1988d5ac21667913602b34633910d63ea59
| -rw-r--r-- | services/core/java/com/android/server/wm/RecentsAnimationController.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java index 38e3e3a82cb6..f97a48b5f9a9 100644 --- a/services/core/java/com/android/server/wm/RecentsAnimationController.java +++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java @@ -263,13 +263,6 @@ public class RecentsAnimationController implements DeathRecipient { "finish(%b): mCanceled=%b", moveHomeToTop, mCanceled); final long token = Binder.clearCallingIdentity(); try { - synchronized (mService.getWindowManagerLock()) { - // Remove all new task targets. - for (int i = mPendingNewTaskTargets.size() - 1; i >= 0; i--) { - removeTaskInternal(mPendingNewTaskTargets.get(i)); - } - } - // Note, the callback will handle its own synchronization, do not lock on WM lock // prior to calling the callback mCallbacks.onAnimationFinished(moveHomeToTop @@ -759,7 +752,7 @@ public class RecentsAnimationController implements DeathRecipient { // the task-id with the leaf id. final Task leafTask = task.getTopLeafTask(); int taskId = leafTask.mTaskId; - TaskAnimationAdapter adapter = (TaskAnimationAdapter) addAnimation(task, + TaskAnimationAdapter adapter = addAnimation(task, !recentTaskIds.get(taskId), true /* hidden */, finishedCallback); mPendingNewTaskTargets.add(taskId); return adapter.createRemoteAnimationTarget(taskId); @@ -1012,6 +1005,7 @@ public class RecentsAnimationController implements DeathRecipient { taskAdapter.onCleanup(); } // Should already be empty, but clean-up pending task-appears in-case they weren't sent. + mPendingNewTaskTargets.clear(); mPendingTaskAppears.clear(); for (int i = mPendingWallpaperAnimations.size() - 1; i >= 0; i--) { |