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

Commit 383f9fed authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Bind wallpaper at later boot phase.

We need to wait until third-party apps can start before we try
binding to the wallpaper.

Bug: 28166684
Change-Id: I6ef559a667104e830e97da68b437ff592816f6f3
parent 3c587091
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -128,6 +128,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
        public void onBootPhase(int phase) {
        public void onBootPhase(int phase) {
            if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) {
            if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) {
                mService.systemReady();
                mService.systemReady();
            } else if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
                mService.switchUser(UserHandle.USER_SYSTEM, null);
            }
            }
        }
        }


@@ -850,9 +852,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
                Slog.i(TAG, "Nondefault wallpaper component; gracefully ignoring");
                Slog.i(TAG, "Nondefault wallpaper component; gracefully ignoring");
            }
            }
        }
        }
        switchWallpaper(wallpaper, null);
        wallpaper.wallpaperObserver = new WallpaperObserver(wallpaper);
        wallpaper.wallpaperObserver.startWatching();


        IntentFilter userFilter = new IntentFilter();
        IntentFilter userFilter = new IntentFilter();
        userFilter.addAction(Intent.ACTION_USER_REMOVED);
        userFilter.addAction(Intent.ACTION_USER_REMOVED);