Merge Task and TaskRecord into one class (65/n)

Merge Task and TaskRecord into a single Task class. Also Consolidate
updateTaskMovement() call points to TaskStack.onChildPositionChanged().

Bug: 80414790
Test: Existing tests pass
Change-Id: Iec0101b211bf34fab42131aae6cddfe1262e2add
diff --git a/services/core/java/com/android/server/wm/RecentsAnimation.java b/services/core/java/com/android/server/wm/RecentsAnimation.java
index 83804a7..caf95de 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimation.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimation.java
@@ -211,7 +211,7 @@
                 // If there are multiple tasks in the target stack (ie. the home stack, with 3p
                 // and default launchers coexisting), then move the task to the top as a part of
                 // moving the stack to the front
-                final TaskRecord task = targetActivity.getTaskRecord();
+                final Task task = targetActivity.getTask();
                 if (targetStack.topTask() != task) {
                     targetStack.positionChildAtTop(task);
                 }
@@ -328,7 +328,7 @@
                         if (sendUserLeaveHint) {
                             // Setting this allows the previous app to PiP.
                             mStackSupervisor.mUserLeaving = true;
-                            targetStack.moveTaskToFrontLocked(targetActivity.getTaskRecord(),
+                            targetStack.moveTaskToFrontLocked(targetActivity.getTask(),
                                     true /* noAnimation */, null /* activityOptions */,
                                     targetActivity.appTimeTracker,
                                     "RecentsAnimation.onAnimationFinished()");
@@ -491,7 +491,7 @@
         }
 
         for (int i = targetStack.getChildCount() - 1; i >= 0; i--) {
-            final TaskRecord task = targetStack.getChildAt(i);
+            final Task task = targetStack.getChildAt(i);
             if (task.mUserId == mUserId
                     && task.getBaseIntent().getComponent().equals(mTargetIntent.getComponent())) {
                 return task.getTopActivity();