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

View File

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