Remove unnecessary wallpaper adjustment on transition

Since WallpaperController won't change wallpaper target if the
closing target is in transition, the adjustWallpaperWindows
won't change any state when transition is ready but spend the
time to traverse.

The entry points from AR#setVisibility->requestUpdateWallpaperIfNeeded
and transition finish->commitVisibility->postApplyAnimation
->FINISH_LAYOUT_REDO_WALLPAPER are already enough to update.

Bug: 260059642
Bug: 258880446
Test: WallpaperControllerTests
Change-Id: I6b48099c455c2987c74b31b9d6d7d06d484a7c56
(cherry picked from commit 46332a8e65d57f4ee125125524e6f33bbd2472c7)
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index b6e52aaf..f737b35 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -918,13 +918,6 @@
             mOverrideOptions = null;
             return;
         }
-        // Ensure that wallpaper visibility is updated with the latest wallpaper target.
-        for (int i = mParticipants.size() - 1; i >= 0; --i) {
-            final WindowContainer<?> wc = mParticipants.valueAt(i);
-            if (isWallpaper(wc) && wc.getDisplayContent() != null) {
-                wc.getDisplayContent().mWallpaperController.adjustWallpaperWindows();
-            }
-        }
 
         mState = STATE_PLAYING;
         mStartTransaction = transaction;
diff --git a/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
index 6333508..9090c55 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
@@ -372,15 +372,6 @@
         dc.mTransitionController.finishTransition(transit);
         assertFalse(wallpaperWindow.isVisible());
         assertFalse(token.isVisible());
-
-        // Assume wallpaper was visible. When transaction is ready without wallpaper target,
-        // wallpaper should be requested to be invisible.
-        token.setVisibility(true);
-        transit = dc.mTransitionController.createTransition(TRANSIT_CLOSE);
-        dc.mTransitionController.collect(token);
-        transit.onTransactionReady(transit.getSyncId(), t);
-        assertFalse(token.isVisibleRequested());
-        assertTrue(token.isVisible());
     }
 
     private static void prepareSmallerSecondDisplay(DisplayContent dc, int width, int height) {