feat: restore mms
This commit is contained in:
parent
9656207135
commit
e10a410788
10 changed files with 438 additions and 142 deletions
|
|
@ -0,0 +1,28 @@
|
|||
package com.simplemobiletools.smsmessenger.models
|
||||
|
||||
import android.content.ContentValues
|
||||
import android.provider.Telephony
|
||||
import androidx.core.content.contentValuesOf
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class MmsAddress(
|
||||
@SerializedName("address")
|
||||
val address: String,
|
||||
@SerializedName("msg_id")
|
||||
val msgId: Int,
|
||||
@SerializedName("type")
|
||||
val type: Int,
|
||||
@SerializedName("charset")
|
||||
val charset: Int
|
||||
) {
|
||||
|
||||
fun toContentValues(): ContentValues {
|
||||
// msgId would be added at the point of insertion
|
||||
// because it may have changed
|
||||
return contentValuesOf(
|
||||
Telephony.Mms.Addr.ADDRESS to address,
|
||||
Telephony.Mms.Addr.TYPE to type,
|
||||
Telephony.Mms.Addr.CHARSET to charset,
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue