Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4233f262 authored by Justin Mattson's avatar Justin Mattson
Browse files

Check if WallpaperService is enabled

If WallpaperService is disabled, don't delay starting SurfaceFlinger
until it is.

Change-Id: I95db6b7bc791329e2bae33472cfeb125e5f6f324
parent 14d3b807
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -4874,7 +4874,11 @@ public class WindowManagerService extends IWindowManager.Stub
                // have been drawn.
                // have been drawn.
                boolean haveBootMsg = false;
                boolean haveBootMsg = false;
                boolean haveApp = false;
                boolean haveApp = false;
                // if the wallpaper service is disabled on the device, we're never going to have
                // wallpaper, don't bother waiting for it
                boolean haveWallpaper = false;
                boolean haveWallpaper = false;
                boolean wallpaperEnabled = mContext.getResources().getBoolean(
                        com.android.internal.R.bool.config_enableWallpaperService);
                boolean haveKeyguard = true;
                boolean haveKeyguard = true;
                final int N = mWindows.size();
                final int N = mWindows.size();
                for (int i=0; i<N; i++) {
                for (int i=0; i<N; i++) {
@@ -4910,7 +4914,8 @@ public class WindowManagerService extends IWindowManager.Stub
                if (DEBUG_SCREEN_ON || DEBUG_BOOT) {
                if (DEBUG_SCREEN_ON || DEBUG_BOOT) {
                    Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages
                    Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages
                            + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp
                            + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp
                            + " haveWall=" + haveWallpaper + " haveKeyguard=" + haveKeyguard);
                            + " haveWall=" + haveWallpaper + " wallEnabled=" + wallpaperEnabled
                            + " haveKeyguard=" + haveKeyguard);
                }
                }


                // If we are turning on the screen to show the boot message,
                // If we are turning on the screen to show the boot message,
@@ -4922,7 +4927,8 @@ public class WindowManagerService extends IWindowManager.Stub
                // If we are turning on the screen after the boot is completed
                // If we are turning on the screen after the boot is completed
                // normally, don't do so until we have the application and
                // normally, don't do so until we have the application and
                // wallpaper.
                // wallpaper.
                if (mSystemBooted && ((!haveApp && !haveKeyguard) || !haveWallpaper)) {
                if (mSystemBooted && ((!haveApp && !haveKeyguard) ||
                        (wallpaperEnabled && !haveWallpaper))) {
                    return;
                    return;
                }
                }
            }
            }