mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Added support for AVIF
This commit is contained in:
@@ -109,11 +109,20 @@ class ImageHelper {
|
||||
"image/heif"
|
||||
));
|
||||
|
||||
// https://developer.android.com/about/versions/12/features#avif
|
||||
static final List<String> IMAGE_TYPES12 = Collections.unmodifiableList(Arrays.asList(
|
||||
"image/avif"
|
||||
));
|
||||
|
||||
static boolean isImage(String mimeType) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
if (IMAGE_TYPES8.contains(mimeType))
|
||||
return true;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||
if (IMAGE_TYPES12.contains(mimeType))
|
||||
return true;
|
||||
|
||||
return IMAGE_TYPES.contains(mimeType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user