Add support for disabling wallpaper service

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2011-10-31 12:50:12 -04:00
committed by Mike Lockwood
parent 491f40ddf2
commit c067c9c373
4 changed files with 45 additions and 9 deletions

View File

@ -463,14 +463,17 @@ class ServerThread extends Thread {
reportWtf("starting DropBoxManagerService", e);
}
try {
Slog.i(TAG, "Wallpaper Service");
if (!headless) {
wallpaper = new WallpaperManagerService(context);
ServiceManager.addService(Context.WALLPAPER_SERVICE, wallpaper);
if (context.getResources().getBoolean(
com.android.internal.R.bool.config_enableWallpaperService)) {
try {
Slog.i(TAG, "Wallpaper Service");
if (!headless) {
wallpaper = new WallpaperManagerService(context);
ServiceManager.addService(Context.WALLPAPER_SERVICE, wallpaper);
}
} catch (Throwable e) {
reportWtf("starting Wallpaper Service", e);
}
} catch (Throwable e) {
reportWtf("starting Wallpaper Service", e);
}
if (!"0".equals(SystemProperties.get("system_init.startaudioservice"))) {