[Webapps] Fix splash screen scaling on Android P
When loading splash_icon.xml on Android P, scaling doesn't occur until after the image is drawn. As a result, if we try to show a lower DPI image such as the mdpi icon, the Bitmap#getWidth/Bitmap#getHeight values will only return the original image size on Android P. What we actually want is the scaled image size. To do so we use Bitmap#getScaledWidth/Bitmap#getScaledHeight which return the scaled image size in pixels. This wasn't a problem on O and earlier since this scaling occurred when the bitmap was loaded into memory (prior to rendering). Bug: 819755 Change-Id: I86ad9466d653d4d8501a8c672925b2ba86819d8d Reviewed-on: https://chromium-review.googlesource.com/1148815Reviewed-by:Peter Kotwicz <pkotwicz@chromium.org> Reviewed-by:
Xi Han <hanxi@chromium.org> Reviewed-by:
Dominick Ng <dominickn@chromium.org> Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org> Cr-Commit-Position: refs/heads/master@{#577987}
Showing
Please register or sign in to comment