上篇是短信,现在读彩信,从sendMmsWork开始:
com.android.mms.data.WorkingMessage.java
sendMmsWorker -> MmsMessageSender.sendMessage(threadId)
com.android.mms.transaction.MmsMessageSender.java
sendMessage -> mContext.startService[TransactionService.class]
[注意 pdu.getMessageType() != PduHeaders.MESSAGE_TYPE_SEND_REQ throw new MmsException]
com.android.mms.transaction.TransactionService.java
onStartCommand -> launchTransaction -> ServiceHandler.sendMessage[EVENT_TRANSACTION_REQUEST]
ServiceHandler:handlemessage - EVENT_TRANSACTION_REQUEST - Transaction.SEND_TRANSACTION -
transaction = new SendTransaction - processTransaction(transaction)
SendTransaction.process
[注意,标红处查看代码 getTransactionType case PduHeaders.MESSAGE_TYPE_SEND_REQ:
return Transaction.SEND_TRANSACTION]
com.android.mms.transaction.SendTransaction.java
process -> run -> sendPdu -> HttpUtils.httpConnection