mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
Refactor google mms packages, correct expected incoming MMS action
This commit is contained in:
@@ -23,16 +23,16 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.provider.Telephony
|
||||
import com.google.android.mms.ContentType
|
||||
import com.google.android.mms.pdu.GenericPdu
|
||||
import com.google.android.mms.pdu.NotificationInd
|
||||
import com.google.android.mms.pdu.PduHeaders
|
||||
import com.google.android.mms.pdu.PduParser
|
||||
import com.google.android.mms.pdu_alt.GenericPdu
|
||||
import com.google.android.mms.pdu_alt.NotificationInd
|
||||
import com.google.android.mms.pdu_alt.PduHeaders
|
||||
import com.google.android.mms.pdu_alt.PduParser
|
||||
import timber.log.Timber
|
||||
|
||||
class MmsReceiver : BroadcastReceiver() {
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
if (Telephony.Sms.Intents.WAP_PUSH_RECEIVED_ACTION == intent.action && ContentType.MMS_MESSAGE == intent.type) {
|
||||
if (Telephony.Sms.Intents.WAP_PUSH_DELIVER_ACTION == intent.action && ContentType.MMS_MESSAGE == intent.type) {
|
||||
val data = intent.getByteArrayExtra("data")
|
||||
val parser = PduParser(data)
|
||||
var pdu: GenericPdu? = null
|
||||
@@ -62,6 +62,10 @@ class MmsReceiver : BroadcastReceiver() {
|
||||
PduHeaders.MESSAGE_TYPE_READ_ORIG_IND -> {
|
||||
Timber.v("Received read report")
|
||||
}
|
||||
|
||||
else -> {
|
||||
Timber.v("Received unhandled MMS type: ${pdu.messageType}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user