Change Stack to have generic WindowContainer children (76/n)

- Step towards Tasks containing other Tasks.
- There are several places where we want to perform an operation on all
tasks in a branch of the hierarchy. We end up looping based on the
parent knowing what type of children is in the sub-branch. Instead use
forAllTasks() to perfrom the operation on all tasks in the sub-branch.

Bug: 80414790
Test: Existing tests pass
Change-Id: I5551fe440e56bb8d6982002f93037827b00c70fc
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
index 716e777..e086b28 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
@@ -744,7 +744,7 @@
         final ActivityStack stack =
                 new ActivityTestsBase.StackBuilder(mWm.mAtmService.mRootActivityContainer)
                         .setDisplay(dc).build();
-        final ActivityRecord activity = stack.topTask().getTopNonFinishingActivity();
+        final ActivityRecord activity = stack.getTopMostTask().getTopNonFinishingActivity();
 
         activity.setRequestedOrientation(newOrientation);
 
@@ -766,7 +766,7 @@
         final ActivityStack stack =
                 new ActivityTestsBase.StackBuilder(mWm.mAtmService.mRootActivityContainer)
                         .setDisplay(dc).build();
-        final ActivityRecord activity = stack.topTask().getTopNonFinishingActivity();
+        final ActivityRecord activity = stack.getTopMostTask().getTopNonFinishingActivity();
 
         activity.setRequestedOrientation(newOrientation);