mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Support pasting of images into input text.
This commit is contained in:
committed by
Greyson Parrelli
parent
ca508514a7
commit
c08199659b
@@ -283,15 +283,30 @@ public class MediaUtil {
|
||||
}
|
||||
|
||||
public static boolean isImageType(String contentType) {
|
||||
return (null != contentType) && contentType.startsWith("image/");
|
||||
if (contentType == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return contentType.startsWith("image/") ||
|
||||
contentType.equals(MediaStore.Images.Media.CONTENT_TYPE);
|
||||
}
|
||||
|
||||
public static boolean isAudioType(String contentType) {
|
||||
return (null != contentType) && contentType.startsWith("audio/");
|
||||
if (contentType == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return contentType.startsWith("audio/") ||
|
||||
contentType.equals(MediaStore.Audio.Media.CONTENT_TYPE);
|
||||
}
|
||||
|
||||
public static boolean isVideoType(String contentType) {
|
||||
return (null != contentType) && contentType.startsWith("video/");
|
||||
if (contentType == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return contentType.startsWith("video/") ||
|
||||
contentType.equals(MediaStore.Video.Media.CONTENT_TYPE);
|
||||
}
|
||||
|
||||
public static boolean isImageOrVideoType(String contentType) {
|
||||
|
||||
Reference in New Issue
Block a user