Merge "Bitmap just needs to be software to extract color"

This commit is contained in:
TreeHugger Robot
2020-09-29 22:43:46 +00:00
committed by Android (Google) Code Review

View File

@@ -572,7 +572,7 @@ class MediaDataManager(
val source = ImageDecoder.createSource(context.getContentResolver(), uri)
return try {
ImageDecoder.decodeBitmap(source) {
decoder, info, source -> decoder.isMutableRequired = true
decoder, info, source -> decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE
}
} catch (e: IOException) {
Log.e(TAG, "Unable to load bitmap", e)