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
Loading
Please register or sign in to comment