Don't throw warning if MMS is of type application/smil

This commit is contained in:
Moez Bhatti
2018-01-12 19:07:29 -05:00
parent 161f673914
commit 050981faff
2 changed files with 7 additions and 6 deletions
@@ -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() -> {
+3 -6
View File
@@ -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