diff options
| author | 2023-05-03 00:51:23 +0000 | |
|---|---|---|
| committer | 2023-05-03 00:51:23 +0000 | |
| commit | 8e4a7e8b84dc41c7b1ece490300d1f6c915bf61e (patch) | |
| tree | 31d2745f4690a5e521ca373a0a2d8874ba096d9c | |
| parent | 0cdca7eb57a06dcf1f17991ff1879395de9344b8 (diff) | |
| parent | b7967656fd557c661f26decf1f173eccb8b6d7f3 (diff) | |
Merge "Fix NPE causing CTS test failure" into udc-dev
| -rw-r--r-- | core/java/android/app/WallpaperManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index 6592019dc0d9..f6733047d965 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -822,6 +822,10 @@ public class WallpaperManager { */ @TestApi public boolean isLockscreenLiveWallpaperEnabled() { + return isLockscreenLiveWallpaperEnabledHelper(); + } + + private static boolean isLockscreenLiveWallpaperEnabledHelper() { if (sGlobals == null) { sIsLockscreenLiveWallpaperEnabled = SystemProperties.getBoolean( "persist.wm.debug.lockscreen_live_wallpaper", false); @@ -2757,7 +2761,7 @@ public class WallpaperManager { public static InputStream openDefaultWallpaper(Context context, @SetWallpaperFlags int which) { final String whichProp; final int defaultResId; - if (which == FLAG_LOCK && !sIsLockscreenLiveWallpaperEnabled) { + if (which == FLAG_LOCK && !isLockscreenLiveWallpaperEnabledHelper()) { /* Factory-default lock wallpapers are not yet supported whichProp = PROP_LOCK_WALLPAPER; defaultResId = com.android.internal.R.drawable.default_lock_wallpaper; |