Merge "Fix NPE causing CTS test failure" into udc-dev am: 8e4a7e8b84
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22977640 Change-Id: I9012f5c3270712030ec2e18094149a348d7a7f84 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -822,6 +822,10 @@ public class WallpaperManager {
|
|||||||
*/
|
*/
|
||||||
@TestApi
|
@TestApi
|
||||||
public boolean isLockscreenLiveWallpaperEnabled() {
|
public boolean isLockscreenLiveWallpaperEnabled() {
|
||||||
|
return isLockscreenLiveWallpaperEnabledHelper();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isLockscreenLiveWallpaperEnabledHelper() {
|
||||||
if (sGlobals == null) {
|
if (sGlobals == null) {
|
||||||
sIsLockscreenLiveWallpaperEnabled = SystemProperties.getBoolean(
|
sIsLockscreenLiveWallpaperEnabled = SystemProperties.getBoolean(
|
||||||
"persist.wm.debug.lockscreen_live_wallpaper", false);
|
"persist.wm.debug.lockscreen_live_wallpaper", false);
|
||||||
@@ -2757,7 +2761,7 @@ public class WallpaperManager {
|
|||||||
public static InputStream openDefaultWallpaper(Context context, @SetWallpaperFlags int which) {
|
public static InputStream openDefaultWallpaper(Context context, @SetWallpaperFlags int which) {
|
||||||
final String whichProp;
|
final String whichProp;
|
||||||
final int defaultResId;
|
final int defaultResId;
|
||||||
if (which == FLAG_LOCK && !sIsLockscreenLiveWallpaperEnabled) {
|
if (which == FLAG_LOCK && !isLockscreenLiveWallpaperEnabledHelper()) {
|
||||||
/* Factory-default lock wallpapers are not yet supported
|
/* Factory-default lock wallpapers are not yet supported
|
||||||
whichProp = PROP_LOCK_WALLPAPER;
|
whichProp = PROP_LOCK_WALLPAPER;
|
||||||
defaultResId = com.android.internal.R.drawable.default_lock_wallpaper;
|
defaultResId = com.android.internal.R.drawable.default_lock_wallpaper;
|
||||||
|
|||||||
Reference in New Issue
Block a user