forked from upstream-mirrors/quik
Don't throw warning if MMS is of type application/smil
This commit is contained in:
@@ -43,6 +43,10 @@ class CursorToPart @Inject constructor(private val context: Context) : Mapper<Cu
|
||||
val data = from.getString(from.getColumnIndexOrThrow(Telephony.Mms.Part._DATA))
|
||||
|
||||
when {
|
||||
isSmil() -> {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
isImage() -> image = ContentUris.withAppendedId(CONTENT_URI, id).toString()
|
||||
|
||||
isText() -> {
|
||||
|
||||
@@ -30,12 +30,9 @@ open class MmsPart : RealmObject() {
|
||||
var text: String? = null
|
||||
var image: String? = null
|
||||
|
||||
fun isImage()
|
||||
= "image/jpeg" == type
|
||||
|| "image/bmp" == type
|
||||
|| "image/gif" == type
|
||||
|| "image/jpg" == type
|
||||
|| "image/png" == type
|
||||
fun isSmil() = "application/smil" == type
|
||||
|
||||
fun isImage() = listOf("image/jpeg", "image/bmp", "image/gif", "image/jpg", "image/png").contains(type)
|
||||
|
||||
fun isText() = "text/plain" == type
|
||||
|
||||
|
||||
Reference in New Issue
Block a user