From 79fac3a45af0657efe693636fad1705f31508703 Mon Sep 17 00:00:00 2001 From: Chris Poultney Date: Wed, 23 Nov 2022 22:00:26 +0000 Subject: [PATCH] Add override to WallpaperManager.peekBitmapDimensions with `which` param This creates the method stub; implementation will be in master. Bug: 253481667 Test: TreeHugger Change-Id: I99fcf70717e5e0bacd303e9d7caee466d218a98a --- core/java/android/app/WallpaperManager.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index 14fe5226b9d91..3e6283e25aa5e 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -1132,11 +1132,25 @@ public class WallpaperManager { * @return the dimensions of system wallpaper * @hide */ + @Nullable public Rect peekBitmapDimensions() { return sGlobals.peekWallpaperDimensions( mContext, true /* returnDefault */, mContext.getUserId()); } + /** + * Peek the dimensions of given wallpaper of the user without decoding it. + * + * @param which Wallpaper type. Must be either {@link #FLAG_SYSTEM} or + * {@link #FLAG_LOCK}. + * @return the dimensions of system wallpaper + * @hide + */ + @Nullable + public Rect peekBitmapDimensions(@SetWallpaperFlags int which) { + return peekBitmapDimensions(); + } + /** * Get an open, readable file descriptor to the given wallpaper image file. * The caller is responsible for closing the file descriptor when done ingesting the file.