Add media constraints for arbitrary file types

Fixes #6573
// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-04-24 15:52:48 -07:00
parent 03e347bfd9
commit 9bf198bb81
4 changed files with 17 additions and 1 deletions

View File

@@ -164,6 +164,10 @@ public class MediaUtil {
return !TextUtils.isEmpty(contentType) && contentType.trim().startsWith("video/");
}
public static boolean isFile(Attachment attachment) {
return !isImage(attachment) && !isAudio(attachment) && !isVideo(attachment);
}
public static boolean hasVideoThumbnail(Uri uri) {
Log.w(TAG, "Checking: " + uri);