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

Skip to content
Commit 3dc7364e authored by wilsonshih's avatar wilsonshih
Browse files

Update density dpi before load drawable.

When load a BitmapDrawable object with specific density, there will
decode the image based on the density from display metrics, so even
when load with higher override density, the final intrinsic size of the
BitmapDrawable can still not big enough to draw on expect size.

In order to load a bigger size BitmapDrawable object from a resources,
there should also update the densityDpi on the display metrics. But
since this kind of use case is relative rare, we use a standalone
IconProvider object to load the Drawable object for higher density, so
this resources object won't affect the entire system.

Also, since this symptom is not noticeable at high density, the
standalone icon provider only used for low density situation, so there
should be no performance loss for most high denstiy device.

Bug: 215673281
Test: atest StartingSurfaceDrawerTests
Test: snapshot to see the loaded bitmap.
Change-Id: Idd769327a8b0987f921c7d421ea1d9bb38a507ba
parent 68e57d45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment