Add config flag to specify if wallpaper is rendered

DisplayContent#checkWaitingForWindows is used to block turning on
display at boot until wallpaper is ready. However when Android runs in a
container, wallpaper can be rendred outside of the container. In this
case DisplayContent#checkWaitingForWindows cannot find wallpaper window
and it blocks boot until timeout.

The CL adds config_checkWallpaperAtBoot flag to let
checkWaitingForWindow skip wallpaper check.

Bug: 38394691
Test: Check boot on marlin
Change-Id: I1d051521a5be06a4d773780de6fdc481d09acb95
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 55c17b9..eba69f0 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1428,6 +1428,9 @@
     <!-- True if WallpaperService is enabled -->
     <bool name="config_enableWallpaperService">true</bool>
 
+    <!-- True if the device should block turning display on at boot until wallpaper is ready -->
+    <bool name="config_checkWallpaperAtBoot">true</bool>
+
     <!-- Class name of WallpaperManagerService. -->
     <string name="config_wallpaperManagerServiceName">com.android.server.wallpaper.WallpaperManagerService</string>
 
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 75f8013..39fc0d2 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -294,6 +294,7 @@
   <java-symbol type="bool" name="split_action_bar_is_narrow" />
   <java-symbol type="bool" name="config_useVolumeKeySounds" />
   <java-symbol type="bool" name="config_enableWallpaperService" />
+  <java-symbol type="bool" name="config_checkWallpaperAtBoot" />
   <java-symbol type="string" name="config_wallpaperManagerServiceName" />
   <java-symbol type="bool" name="config_enableUpdateableTimeZoneRules" />
   <java-symbol type="bool" name="config_timeZoneRulesUpdateTrackingEnabled" />
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 3e47ea6..af7201c 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -2649,6 +2649,8 @@
         // wallpaper, don't bother waiting for it
         boolean wallpaperEnabled = mService.mContext.getResources().getBoolean(
                 com.android.internal.R.bool.config_enableWallpaperService)
+                && mService.mContext.getResources().getBoolean(
+                        com.android.internal.R.bool.config_checkWallpaperAtBoot)
                 && !mService.mOnlyCore;
 
         if (DEBUG_SCREEN_ON || DEBUG_BOOT) Slog.i(TAG_WM,