use of org.robolectric.util.NamedStream in project robolectric by robolectric.
the class ShadowBitmapFactory method decodeStream.
@Implementation
public static Bitmap decodeStream(InputStream is, Rect outPadding, BitmapFactory.Options opts) {
String name = is instanceof NamedStream ? is.toString().replace("stream for ", "") : null;
Point imageSize = is instanceof NamedStream ? null : ImageUtil.getImageSizeFromStream(is);
Bitmap bitmap = create(name, opts, imageSize);
ShadowBitmap shadowBitmap = Shadows.shadowOf(bitmap);
shadowBitmap.createdFromStream = is;
return bitmap;
}
Aggregations