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

Commit 1261c81b authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Add sampleSize to wallpaper_info.xml

Without that, the sample size is assumed to be 1 on reboot. Let's not
go in the details of what this breaks, let's just assume that this
breaks stuff.

Flag: ACONFIG com.android.windows.flag.multi_crop DEVELOPMENT
Bug: 328250071
Test: manual debug (unfortunately we don't have reboot tests)
Change-Id: If55c309c5c1a09a354c0c1149be3719229d53142
parent 544d2c04
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -341,6 +341,7 @@ public class WallpaperDataParser {
            } else {
                wallpaper.cropHint.set(totalCropHint);
            }
            wallpaper.mSampleSize = parser.getAttributeFloat(null, "sampleSize", 1f);
        } else {
            wallpaper.cropHint.set(totalCropHint);
        }
@@ -493,6 +494,7 @@ public class WallpaperDataParser {
            out.attributeInt(null, "totalCropTop", wallpaper.cropHint.top);
            out.attributeInt(null, "totalCropRight", wallpaper.cropHint.right);
            out.attributeInt(null, "totalCropBottom", wallpaper.cropHint.bottom);
            out.attributeFloat(null, "sampleSize", wallpaper.mSampleSize);
        } else if (!multiCrop()) {
            final DisplayData wpdData =
                    mWallpaperDisplayHelper.getDisplayDataOrCreate(DEFAULT_DISPLAY);