Generalize the recents animation to work with non-home activity.

- When quickstep is enabled with 3p launchers, we need to still swipe up
  to the recents component activity (as defined in the framework resource),
  which is started in the recents stack. This CL resolves the target by
  looking at the target intent (only resolving to HOME or RECENTS) to
  determine which stack to use for the transition.

Bug: 77157702
Test: atest FrameworksServicesTests:com.android.server.am.ActivityStackTests
Test: Manual, ensure we can still swipe up to home and also to fallback
      activity when launcher is not the default home

Change-Id: If98f63cfd561861b1772249079ed07e8354142e0
diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java
index 6de1579..7eaca5d 100644
--- a/services/core/java/com/android/server/wm/WallpaperController.java
+++ b/services/core/java/com/android/server/wm/WallpaperController.java
@@ -26,7 +26,7 @@
 
 import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
 import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER;
-import static com.android.server.wm.RecentsAnimationController.REORDER_MOVE_HOME_TO_ORIGINAL_POSITION;
+import static com.android.server.wm.RecentsAnimationController.REORDER_MOVE_TO_ORIGINAL_POSITION;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_SCREENSHOT;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WALLPAPER;
@@ -620,7 +620,7 @@
             // If there was a recents animation in progress, cancel that animation
             if (mService.getRecentsAnimationController() != null) {
                 mService.getRecentsAnimationController().cancelAnimation(
-                        REORDER_MOVE_HOME_TO_ORIGINAL_POSITION);
+                        REORDER_MOVE_TO_ORIGINAL_POSITION);
             }
             return true;
         }