短信发送流程
ComposeMessageActivity.java
当点击发送按钮的时候
ComposeMessageActivity.java --->confirmSendMessageIfNeeded()
ComposeMessageActivity.java--->sendMessage()
WorkingMessage.java--->Send()
If里面是彩信我们现在只关心短信else{},在这里首先拿到短信内容开线程调用preSendSmsWorker继续发送短信
WorkingMessage.java--->preSendSmsWorker()
首先获取smsMessagesSender对象调用sendMesage方法
SmsMessageSender.java--->queueMessage()
短信添加到待发送数据库中等待发送,发送广播调用SmsReceiverService.ACTION_SEND_MESSAGE
SmsReceiverServic.java--->.handleMessage
接收广播响应ACTION_SEND_MESSAGE
如果不是sending中短信sendFirstQueuedMessage查询待发送数据库短信
查询待发送短信数据获取数据调用SmsSingleRecipientSender.sendMessage
SmsSingleRecipientSender.java--->sendMessage
如果是多条短信,拆分发送,且获取到拆分条数
最后调用框架接口发送