diff options
| author | 2020-06-29 21:32:14 +0000 | |
|---|---|---|
| committer | 2020-06-29 21:32:14 +0000 | |
| commit | 36060929b4bd14a33d7c5af0ca0733f3910608bf (patch) | |
| tree | 25aae8ef47e51102c0f4434904aa4d4a044b2138 | |
| parent | 062b1514152fda32ebf6ea710583d5e5da63381a (diff) | |
| parent | 633b198a5de18f5747002ae85f37ac1703a5b985 (diff) | |
Merge "Throw IOE from within resolveImage rather than NPE." into rvc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInlineImageResolver.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInlineImageResolver.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInlineImageResolver.java index 52f7c2cfee96..7bd192d850c1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInlineImageResolver.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInlineImageResolver.java @@ -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; |