[automerger] Use clear-all recent tasks call am: 68df758665

Change-Id: Ic8bcbef8d72e2ca48a2d6ffe4c0d7d40f2fba37c
diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar
index 27de1e9..9d91d7e 100644
--- a/quickstep/libs/sysui_shared.jar
+++ b/quickstep/libs/sysui_shared.jar
Binary files differ
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 2680a26..72ab261 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -990,10 +990,8 @@
         mPendingAnimation = pendingAnimation;
         mPendingAnimation.addEndListener((onEndListener) -> {
             if (onEndListener.isSuccess) {
-                int taskViewCount = getTaskViewCount();
-                for (int i = 0; i < taskViewCount; i++) {
-                    removeTask(getTaskViewAt(i).getTask(), -1, onEndListener, false);
-                }
+                // Remove all the task views now
+                ActivityManagerWrapper.getInstance().removeAllRecentTasks();
                 removeAllViews();
                 onAllTasksRemoved();
             }