Bug 786782 - Part 1/2: don't rely on status-report in multipart sms, r=marshall_law

This commit is contained in:
Vicamo Yang 2012-10-11 19:01:52 +08:00
parent 15f5183733
commit cff92e9b9a

View File

@ -3786,11 +3786,8 @@ let RIL = {
return PDU_FCS_OK;
}
if ((options.segmentMaxSeq > 1)
&& (options.segmentSeq < options.segmentMaxSeq)) {
// Not last segment. Send next segment here.
this._processSentSmsSegment(options);
} else {
if ((options.segmentMaxSeq == 1)
&& (options.segmentSeq == options.segmentMaxSeq)) {
// Last segment delivered with success. Report it.
this.sendDOMMessage({
rilMessageType: "sms-delivered",
@ -4285,6 +4282,7 @@ RIL[REQUEST_RADIO_POWER] = null;
RIL[REQUEST_DTMF] = null;
RIL[REQUEST_SEND_SMS] = function REQUEST_SEND_SMS(length, options) {
if (options.rilRequestError) {
if (DEBUG) debug("REQUEST_SEND_SMS: rilRequestError = " + options.rilRequestError);
switch (options.rilRequestError) {
case ERROR_SMS_SEND_FAIL_RETRY:
if (options.retryCount < SMS_RETRY_MAX) {
@ -4318,10 +4316,7 @@ RIL[REQUEST_SEND_SMS] = function REQUEST_SEND_SMS(length, options) {
if ((options.segmentMaxSeq > 1)
&& (options.segmentSeq < options.segmentMaxSeq)) {
// Not last segment
if (!options.requestStatusReport) {
// Status-Report not requested, send next segment here.
this._processSentSmsSegment(options);
}
this._processSentSmsSegment(options);
} else {
// Last segment sent with success. Report it.
this.sendDOMMessage({