Loading
Fix getBitmapCrops(..., originalBitmap = true) API
Previous computation would compute the crops for the cropped bitmap, then rescale them for the original bitmap via some getOriginalCropHints method. However this is not great, if the sample size is large (e.g. 2), the rounding errors from the cropped bitmaps will be multiplied and can exceed 1, resulting in 2px rounding error for some tests on TV. WallpaperManager CTS expects an error of at most 1px. In the worst cases, getBitmapCrops could return a crop larger than the original bitmap, which shouldn't happen after this CL. Flag: android.app.fix_get_bitmap_crops Bug: 384502688 Test: manual with logs Test: atest WallpaperManagerTest Change-Id: I8c0ed5c2f6fc864fa8ad0adab5c240b195423b4f