Have DisplayContent be the call point for adjusting wallpaper windows

4th step in trying to make the WindowList private to DisplayContent
Have the rest of the system call DisplayContent when they need to
adjust the position of the wallpaper windows in the window list
instead of calling WallpaperController directly. That way the display
content can control the window list that the wallpaper controller sees.

Test: Existing tests pass and manual testing.
Change-Id: Iaa7f421d7cd24d36e5a83e091f77b4a08d0ae123
diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java
index 972a0cb..4ab8887 100644
--- a/services/core/java/com/android/server/wm/WallpaperController.java
+++ b/services/core/java/com/android/server/wm/WallpaperController.java
@@ -628,10 +628,9 @@
         return changed;
     }
 
-    boolean adjustWallpaperWindows() {
+    boolean adjustWallpaperWindows(WindowList windows) {
         mService.mRoot.mWallpaperMayChange = false;
 
-        final WindowList windows = mService.getDefaultWindowListLocked();
         // First find top-most window that has asked to be on top of the wallpaper;
         // all wallpapers go behind it.
         findWallpaperTarget(windows, mFindResults);
@@ -726,8 +725,8 @@
      * Adjusts the wallpaper windows if the input display has a pending wallpaper layout or one of
      * the opening apps should be a wallpaper target.
      */
-    void adjustWallpaperWindowsForAppTransitionIfNeeded(
-            DisplayContent dc, ArraySet<AppWindowToken> openingApps, WindowList windows) {
+    void adjustWallpaperWindowsForAppTransitionIfNeeded(DisplayContent dc,
+            ArraySet<AppWindowToken> openingApps) {
         boolean adjust = false;
         if ((dc.pendingLayoutChanges & FINISH_LAYOUT_REDO_WALLPAPER) != 0) {
             adjust = true;
@@ -741,8 +740,8 @@
             }
         }
 
-        if (adjust && adjustWallpaperWindows()) {
-            dc.assignWindowLayers(true /*setLayoutNeeded*/);
+        if (adjust) {
+            dc.adjustWallpaperWindows();
         }
     }