Remove root window hierarchy logic from ActivityStackSupervior (40/n)

We eventually want to consolidate root window hierarchy logic into
RootWindowContainer. As a first step towards that we separate
the root window hierarchy logic from ActivityStackSupervior into
a temporary new class RootActivityContainer to make it clear what
we later need to consolidate into RootWindowContainer.

Test: Existing tests pass.
Bug: 80414790
Change-Id: I4e890f14a37e31bf55e7f44dd686d709e1e39b9f
diff --git a/services/core/java/com/android/server/wm/TaskPersister.java b/services/core/java/com/android/server/wm/TaskPersister.java
index 8120dec..d50af38 100644
--- a/services/core/java/com/android/server/wm/TaskPersister.java
+++ b/services/core/java/com/android/server/wm/TaskPersister.java
@@ -16,7 +16,7 @@
 
 package com.android.server.wm;
 
-import static com.android.server.wm.ActivityStackSupervisor.MATCH_TASK_IN_STACKS_OR_RECENT_TASKS;
+import static com.android.server.wm.RootActivityContainer.MATCH_TASK_IN_STACKS_OR_RECENT_TASKS;
 
 import android.annotation.NonNull;
 import android.graphics.Bitmap;
@@ -330,7 +330,7 @@
                                 // mWriteQueue.add(new TaskWriteQueueItem(task));
 
                                 final int taskId = task.taskId;
-                                if (mStackSupervisor.anyTaskForIdLocked(taskId,
+                                if (mService.mRootActivityContainer.anyTaskForId(taskId,
                                         MATCH_TASK_IN_STACKS_OR_RECENT_TASKS) != null) {
                                     // Should not happen.
                                     Slog.wtf(TAG, "Existing task with taskId " + taskId + "found");