[Marshmallow] Fix OOM when decoding images
This commit is contained in:
1 parent
ed640ab00e
commit
17a9c02f96
1 file changed
+1
@@ -125,6 +125,7 @@ class Image private constructor(drawable: Drawable, private val src: AutoCloseab
|
||||
colorSpace = if (isAtLeastO) colorSpace else null,
|
||||
size = Size(targetWidth, targetHeight),
|
||||
scale = Scale.FILL,
|
||||
allowInexactSize = true,
|
||||
)
|
||||
val drawable = ImageSource(src.source.openInputStream().source().buffer(), appCtx).use {
|
||||
BitmapFactoryDecoder(it, options).decode().drawable
|
||||
|
||||
Reference in new issue
Block a user