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

Commit d04d4671 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Throw IOE from within resolveImage rather than NPE." into rvc-dev am: 36060929

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12036439

Change-Id: I2692adc7f3b80297f0ab65a6768a28143f31c630
parents 93a87274 36060929
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -124,6 +124,9 @@ public class NotificationInlineImageResolver implements ImageResolver {
     */
    Drawable resolveImage(Uri uri) throws IOException {
        BitmapDrawable image = resolveImageInternal(uri);
        if (image == null || image.getBitmap() == null) {
            throw new IOException("resolveImageInternal returned null for uri: " + uri);
        }
        Bitmap bitmap = image.getBitmap();
        image.setBitmap(Icon.scaleDownIfNecessary(bitmap, mMaxImageWidth, mMaxImageHeight));
        return image;