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))
|
val data = from.getString(from.getColumnIndexOrThrow(Telephony.Mms.Part._DATA))
|
||||||
|
|
||||||
when {
|
when {
|
||||||
|
isSmil() -> {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
isImage() -> image = ContentUris.withAppendedId(CONTENT_URI, id).toString()
|
isImage() -> image = ContentUris.withAppendedId(CONTENT_URI, id).toString()
|
||||||
|
|
||||||
isText() -> {
|
isText() -> {
|
||||||
|
|||||||
@@ -30,12 +30,9 @@ open class MmsPart : RealmObject() {
|
|||||||
var text: String? = null
|
var text: String? = null
|
||||||
var image: String? = null
|
var image: String? = null
|
||||||
|
|
||||||
fun isImage()
|
fun isSmil() = "application/smil" == type
|
||||||
= "image/jpeg" == type
|
|
||||||
|| "image/bmp" == type
|
fun isImage() = listOf("image/jpeg", "image/bmp", "image/gif", "image/jpg", "image/png").contains(type)
|
||||||
|| "image/gif" == type
|
|
||||||
|| "image/jpg" == type
|
|
||||||
|| "image/png" == type
|
|
||||||
|
|
||||||
fun isText() = "text/plain" == type
|
fun isText() = "text/plain" == type
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user