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

Commit c777db12 authored by Chris Poultney's avatar Chris Poultney
Browse files

Return null component in WallpaperInstance for static wallpapers

Bug: 395679036
Flag: EXEMPT bugfix
Test: manually verified setting wallpapers works
Test: manually verified correct component value
Change-Id: Ib253ab1add22863fa342494d8593c0cbe5221909
parent 435b88b0
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;
            }