Allow GIFs to be chosen on API < 24.

We can compress them without resizing.
This commit is contained in:
akwizgran
2021-03-10 15:42:20 +00:00
parent c5d2661c1d
commit b4a5fe6772

View File

@@ -114,12 +114,8 @@ public class AndroidUtils {
/**
* Returns an array of supported content types for image attachments.
* GIFs can't be compressed on API < 24 so they're not supported.
* <p>
* TODO: Remove this restriction when large message support is added
*/
public static String[] getSupportedImageContentTypes() {
if (SDK_INT < 24) return new String[] {"image/jpeg", "image/png"};
else return new String[] {"image/jpeg", "image/png", "image/gif"};
return new String[] {"image/jpeg", "image/png", "image/gif"};
}
}