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

Commit 2bcb9138 authored by Aurélien Pomini's avatar Aurélien Pomini Committed by Android (Google) Code Review
Browse files

Merge "Fix getBitmapCrops when sampleSize != 1" into main

parents 47f8752a b9161e28
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2228,8 +2228,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
            if (wallpaper == null || !wallpaper.mSupportsMultiCrop) return null;
            SparseArray<Rect> relativeSuggestedCrops =
                    mWallpaperCropper.getRelativeCropHints(wallpaper);
            Point croppedBitmapSize =
                    new Point(wallpaper.cropHint.width(), wallpaper.cropHint.height());
            Point croppedBitmapSize = new Point(
                    (int) (0.5f + wallpaper.cropHint.width() / wallpaper.mSampleSize),
                    (int) (0.5f + wallpaper.cropHint.height() / wallpaper.mSampleSize));
            SparseArray<Rect> relativeDefaultCrops =
                    mWallpaperCropper.getDefaultCrops(relativeSuggestedCrops, croppedBitmapSize);
            SparseArray<Rect> adjustedRelativeSuggestedCrops = new SparseArray<>();