wallpaper: fix null service mamanger registered to server

- Don't getService WallPaperManagerService within ctor.

BUG: 277380463
Change-Id: I4297ee0e39318b6ce11744b36fb1690a2e1e10ca
This commit is contained in:
Chen Bai
2023-04-14 06:23:56 +00:00
parent 1c4d0f420c
commit 0787189090

View File

@@ -38,6 +38,7 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.FileUtils;
import android.os.SystemProperties;
import android.util.Slog;
import android.util.SparseArray;
import android.util.Xml;
@@ -85,8 +86,8 @@ class WallpaperDataParser {
mWallpaperCropper = wallpaperCropper;
mImageWallpaper = ComponentName.unflattenFromString(
context.getResources().getString(R.string.image_wallpaper_component));
mIsLockscreenLiveWallpaperEnabled = context.getSystemService(WallpaperManager.class)
.isLockscreenLiveWallpaperEnabled();
mIsLockscreenLiveWallpaperEnabled =
SystemProperties.getBoolean("persist.wm.debug.lockscreen_live_wallpaper", false);
}
private JournaledFile makeJournaledFile(int userId) {