Merge "Throw IOE from within resolveImage rather than NPE." into rvc-dev am: 36060929b4 am: 03fd9a8a15
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12036439 Change-Id: I819479c5165ca5bbd12b46c52b5dc04dbf911fab
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user