Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e59a4fee authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Remove unnecessary clean up of targets" into sc-v2-dev

parents bf4096c6 04728f77
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -264,13 +264,6 @@ public class RecentsAnimationController implements DeathRecipient {
                    "finish(%b): mCanceled=%b", moveHomeToTop, mCanceled);
                    "finish(%b): mCanceled=%b", moveHomeToTop, mCanceled);
            final long token = Binder.clearCallingIdentity();
            final long token = Binder.clearCallingIdentity();
            try {
            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
                // Note, the callback will handle its own synchronization, do not lock on WM lock
                // prior to calling the callback
                // prior to calling the callback
                mCallbacks.onAnimationFinished(moveHomeToTop
                mCallbacks.onAnimationFinished(moveHomeToTop
@@ -760,7 +753,7 @@ public class RecentsAnimationController implements DeathRecipient {
        // the task-id with the leaf id.
        // the task-id with the leaf id.
        final Task leafTask = task.getTopLeafTask();
        final Task leafTask = task.getTopLeafTask();
        int taskId = leafTask.mTaskId;
        int taskId = leafTask.mTaskId;
        TaskAnimationAdapter adapter = (TaskAnimationAdapter) addAnimation(task,
        TaskAnimationAdapter adapter = addAnimation(task,
                !recentTaskIds.get(taskId), true /* hidden */, finishedCallback);
                !recentTaskIds.get(taskId), true /* hidden */, finishedCallback);
        mPendingNewTaskTargets.add(taskId);
        mPendingNewTaskTargets.add(taskId);
        return adapter.createRemoteAnimationTarget(taskId);
        return adapter.createRemoteAnimationTarget(taskId);
@@ -1013,6 +1006,7 @@ public class RecentsAnimationController implements DeathRecipient {
            taskAdapter.onCleanup();
            taskAdapter.onCleanup();
        }
        }
        // Should already be empty, but clean-up pending task-appears in-case they weren't sent.
        // Should already be empty, but clean-up pending task-appears in-case they weren't sent.
        mPendingNewTaskTargets.clear();
        mPendingTaskAppears.clear();
        mPendingTaskAppears.clear();


        for (int i = mPendingWallpaperAnimations.size() - 1; i >= 0; i--) {
        for (int i = mPendingWallpaperAnimations.size() - 1; i >= 0; i--) {