Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a06cddb0 authored by Chris Poultney's avatar Chris Poultney Committed by Android (Google) Code Review
Browse files

Merge "Return null component in WallpaperInstance for static wallpapers" into main

parents 785c2a26 c777db12
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2686,10 +2686,12 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
            if (hasPermission(READ_WALLPAPER_INTERNAL)
                    || (canQueryPackage && !requireReadWallpaper)) {
                // TODO(b/380245309) Remove this when crops are part of the description.
                WallpaperDescription description =
                WallpaperDescription.Builder builder =
                        wallpaper.getDescription().toBuilder().setCropHints(
                                wallpaper.mCropHints).build();
                return new WallpaperInstance(info, description);
                                wallpaper.mCropHints);
                // By convention we return null component for static wallpapers
                if (info == null) builder.setComponent(null);
                return new WallpaperInstance(info, builder.build());
            } else {
                return null;
            }