Merge "Assume successful delivery if no Message Status"

This commit is contained in:
Treehugger Robot
2019-06-13 23:32:09 +00:00
committed by Gerrit Code Review
2 changed files with 12 additions and 16 deletions

View File

@@ -843,20 +843,16 @@ public class SmsMessage {
}
/**
* GSM:
* For an SMS-STATUS-REPORT message, this returns the status field from
* the status report. This field indicates the status of a previously
* submitted SMS, if requested. See TS 23.040, 9.2.3.15 TP-Status for a
* description of values.
* CDMA:
* For not interfering with status codes from GSM, the value is
* shifted to the bits 31-16.
* The value is composed of an error class (bits 25-24) and a status code (bits 23-16).
* Possible codes are described in C.S0015-B, v2.0, 4.5.21.
* GSM: For an SMS-STATUS-REPORT message, this returns the status field from the status report.
* This field indicates the status of a previously submitted SMS, if requested.
* See TS 23.040, 9.2.3.15 TP-Status for a description of values.
* CDMA: For not interfering with status codes from GSM, the value is shifted to the bits 31-16.
* The value is composed of an error class (bits 25-24) and a status code (bits 23-16). Possible
* codes are described in C.S0015-B, v2.0, 4.5.21.
*
* @return 0 indicates the previously sent message was received.
* See TS 23.040, 9.9.2.3.15 and C.S0015-B, v2.0, 4.5.21
* for a description of other possible values.
* @return 0 for GSM or 2 shifted left by 16 for CDMA indicates the previously sent message was
* received. See TS 23.040, 9.2.3.15 and C.S0015-B, v2.0, 4.5.21 for a description of
* other possible values.
*/
public int getStatus() {
return mWrappedSmsMessage.getStatus();

View File

@@ -726,12 +726,12 @@ public class SmsMessage extends SmsMessageBase {
// being reported refers to. The MsgStatus subparameter
// is primarily useful to indicate error conditions -- a
// message without this subparameter is assumed to
// indicate successful delivery (status == 0).
if (! mBearerData.messageStatusSet) {
// indicate successful delivery.
if (!mBearerData.messageStatusSet) {
Rlog.d(LOG_TAG, "DELIVERY_ACK message without msgStatus (" +
(mUserData == null ? "also missing" : "does have") +
" userData).");
status = 0;
status = (BearerData.ERROR_NONE << 8) | BearerData.STATUS_DELIVERED;
} else {
status = mBearerData.errorClass << 8;
status |= mBearerData.messageStatus;