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

Skip to content
Commit 69832591 authored by Jernej Virag's avatar Jernej Virag
Browse files

Support downscaling of Drawable icons in LocalImageResolver

LocalImageResolver only enforced downscaling for Uri-based Icons at this point. This still allowed app developers to provide large bitmaps as a resource or as a bitmap payload itself. This change also verifies these new types of bitmaps.
Also adds an external size parameter to image resolver so different widgets can use it - right now the upper limit was hardcoded in pixels.

This also updates error handling - in some cases ImageDecoder would throw NullPointerException or NotFoundException except for promised IOException. This wraps those cases into more consistent API.

Bug:218845090
Bug:210690571
Bug:224768026

Test: Manually on device - tested on Raven and new Pixel with multiple
                       notification sizes via notification test apk.
      atest LocalImageResolver
      atest NotificationManagerTest

Change-Id: I4701d58ac3335d11a93355a39cee9f5c998eb830
parent 5220fe91
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