一、SmsResponse
SmsResponse类的作用是保存modem发送短信后返回给RIL的结果,包括以下3个部分:
<span style="font-family:SimSun;"> /** Message reference of the just-sent SMS. */
int mMessageRef; //刚才发送的短信的序号,本机唯一
/** ackPdu for the just-sent SMS. */
String mAckPdu; //刚才发送的短信的回应pdu
/**
* errorCode: See 3GPP 27.005, 3.2.5 for GSM/UMTS,
* 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, -1 if unknown or not applicable.
*/
int mErrorCode; //发送失败的错误码</span>
SmsResponse在SMSDispatch.java中会被用到:
<span style="font-family:SimSun;">case EVENT_SEND_SMS_COMPLETE:
// An outbound SMS has been successfully transferred, or failed.
handleSendComplete((AsyncResult) msg.obj);
/**
* Called when SMS send completes. Broadcasts a sentIntent on success.
* On failure, either sets up retries or broadcasts a sentIntent