From 88319c48286f8e480ad9291f0e70395e7e0b34bc Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Mon, 21 Mar 2022 17:09:24 -0700 Subject: [PATCH] Add utility for isWallpaperSupported. Test: Manual Bug: 223549757 Change-Id: I910ad82ab12790f082525353dbdb86def93e3c04 --- src/com/android/launcher3/Utilities.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 9bc3d15da2..972a2e4fef 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -608,6 +608,10 @@ public final class Utilities { LauncherFiles.DEVICE_PREFERENCES_KEY, Context.MODE_PRIVATE); } + public static boolean isWallpaperSupported(Context context) { + return context.getSystemService(WallpaperManager.class).isWallpaperSupported(); + } + public static boolean isWallpaperAllowed(Context context) { return context.getSystemService(WallpaperManager.class).isSetWallpaperAllowed(); }