improve default thumbnail resolution on Android

This commit is contained in:
Wenqi Li 2021-04-18 16:47:25 +08:00
parent ea75f18cfe
commit 7ccffc30d2

View File

@ -492,7 +492,7 @@ class PhotoGalleryPlugin : FlutterPlugin, MethodCallHandler {
try { try {
this.contentResolver.loadThumbnail( this.contentResolver.loadThumbnail(
ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, mediumId.toLong()), ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, mediumId.toLong()),
Size(width ?: 72, height ?: 72), Size(width ?: 512, height ?: 384),
null null
) )
} catch (e: Exception) { } catch (e: Exception) {
@ -524,7 +524,7 @@ class PhotoGalleryPlugin : FlutterPlugin, MethodCallHandler {
try { try {
this.contentResolver.loadThumbnail( this.contentResolver.loadThumbnail(
ContentUris.withAppendedId(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, mediumId.toLong()), ContentUris.withAppendedId(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, mediumId.toLong()),
Size(width ?: 72, height ?: 72), Size(width ?: 512, height ?: 384),
null null
) )
} catch (e: Exception) { } catch (e: Exception) {