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

Commit 1e476595 authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

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
parent 30f98626
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment