Bug 736706 - Part 2: Handle Message Class 0, r=philikon

This commit is contained in:
Vicamo Yang 2012-09-26 14:56:15 +08:00
parent c31702c551
commit 651b0447f4
2 changed files with 15 additions and 3 deletions

View File

@ -1004,9 +1004,12 @@ RadioInterfaceLayer.prototype = {
return; return;
} }
let id = gSmsDatabaseService.saveReceivedMessage(message.sender || null, let id = -1;
if (message.messageClass != RIL.PDU_DCS_MSG_CLASS_0) {
id = gSmsDatabaseService.saveReceivedMessage(message.sender || null,
message.fullBody || null, message.fullBody || null,
message.timestamp); message.timestamp);
}
let sms = gSmsService.createSmsMessage(id, let sms = gSmsService.createSmsMessage(id,
DOM_SMS_DELIVERY_RECEIVED, DOM_SMS_DELIVERY_RECEIVED,
message.sender || null, message.sender || null,

View File

@ -3084,6 +3084,15 @@ let RIL = {
return PDU_FCS_OK; return PDU_FCS_OK;
} }
// TODO: Bug 739143: B2G SMS: Support SMS Storage Full event
if ((message.messageClass != PDU_DCS_MSG_CLASS_0) && !true) {
// `When a mobile terminated message is class 0..., the MS shall display
// the message immediately and send a ACK to the SC ..., irrespective of
// whether there is memory available in the (U)SIM or ME.` ~ 3GPP 23.038
// clause 4.
return PDU_FCS_UNSPECIFIED;
}
if (message.header && (message.header.segmentMaxSeq > 1)) { if (message.header && (message.header.segmentMaxSeq > 1)) {
message = this._processReceivedSmsSegment(message); message = this._processReceivedSmsSegment(message);
} else { } else {