Allow launcher to control home app surfaces during recents animation

- Previously, the app leashes were reparented to the standard animation
  layer which was always above the home layer. Now we reparent both to the
  home animation layer for the duration of the app-controlled recents
  animation. This allows launcher to reorder the home surface above the app
  during the swipe gesture and draw above the app.

Bug: 70341013
Test: atest FrameworksServicesTests:com.android.server.wm.RecentsAnimationControllerTest
Test: Swipe up, and ensure that the home app surface is also being animated
Change-Id: I2c0fa79c7bc1fffaf1374beb45386faea14ec20c
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index cc23ab6..6aa0e01 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -561,9 +561,10 @@
 
     @Override
     public SurfaceControl getAnimationLeashParent() {
-        // Reparent to the animation layer so that we aren't clipped by the non-minimized
-        // stack bounds, currently we only animate the task for the recents animation
-        return getAppAnimationLayer(ANIMATION_LAYER_STANDARD);
+        // Currently, only the recents animation will create animation leashes for tasks. In this
+        // case, reparent the task to the home animation layer while it is being animated to allow
+        // the home activity to reorder the app windows relative to its own.
+        return getAppAnimationLayer(ANIMATION_LAYER_HOME);
     }
 
     boolean isTaskAnimating() {