Merge "Set mOriginatingAddress and mRecipientAddress separately"
This commit is contained in:
@@ -96,6 +96,12 @@ public final class SmsEnvelope {
|
|||||||
*/
|
*/
|
||||||
public CdmaSmsSubaddress origSubaddress;
|
public CdmaSmsSubaddress origSubaddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The destination subaddress identifies the target of the SMS message.
|
||||||
|
* (See 3GPP2 C.S0015-B, v2, 3.4.3.4)
|
||||||
|
*/
|
||||||
|
public CdmaSmsSubaddress destSubaddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The 6-bit bearer reply parameter is used to request the return of a
|
* The 6-bit bearer reply parameter is used to request the return of a
|
||||||
* SMS Acknowledge Message.
|
* SMS Acknowledge Message.
|
||||||
|
|||||||
@@ -615,10 +615,11 @@ public class SmsMessage extends SmsMessageBase {
|
|||||||
}
|
}
|
||||||
addr.origBytes = data;
|
addr.origBytes = data;
|
||||||
Rlog.pii(LOG_TAG, "Addr=" + addr.toString());
|
Rlog.pii(LOG_TAG, "Addr=" + addr.toString());
|
||||||
mOriginatingAddress = addr;
|
if (parameterId == ORIGINATING_ADDRESS) {
|
||||||
if (parameterId == DESTINATION_ADDRESS) {
|
env.origAddress = addr;
|
||||||
// Original address awlays indicates one sender's address for 3GPP2
|
mOriginatingAddress = addr;
|
||||||
// Here add recipient address support along with 3GPP
|
} else {
|
||||||
|
env.destAddress = addr;
|
||||||
mRecipientAddress = addr;
|
mRecipientAddress = addr;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -636,6 +637,11 @@ public class SmsMessage extends SmsMessageBase {
|
|||||||
subdata[index] = convertDtmfToAscii(b);
|
subdata[index] = convertDtmfToAscii(b);
|
||||||
}
|
}
|
||||||
subAddr.origBytes = subdata;
|
subAddr.origBytes = subdata;
|
||||||
|
if (parameterId == ORIGINATING_SUB_ADDRESS) {
|
||||||
|
env.origSubaddress = subAddr;
|
||||||
|
} else {
|
||||||
|
env.destSubaddress = subAddr;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BEARER_REPLY_OPTION:
|
case BEARER_REPLY_OPTION:
|
||||||
dis.read(parameterData, 0, parameterLen);
|
dis.read(parameterData, 0, parameterLen);
|
||||||
@@ -665,9 +671,6 @@ public class SmsMessage extends SmsMessageBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// link the filled objects to this SMS
|
// link the filled objects to this SMS
|
||||||
mOriginatingAddress = addr;
|
|
||||||
env.origAddress = addr;
|
|
||||||
env.origSubaddress = subAddr;
|
|
||||||
mEnvelope = env;
|
mEnvelope = env;
|
||||||
mPdu = pdu;
|
mPdu = pdu;
|
||||||
|
|
||||||
@@ -706,12 +709,12 @@ public class SmsMessage extends SmsMessageBase {
|
|||||||
|
|
||||||
if (mOriginatingAddress != null) {
|
if (mOriginatingAddress != null) {
|
||||||
decodeSmsDisplayAddress(mOriginatingAddress);
|
decodeSmsDisplayAddress(mOriginatingAddress);
|
||||||
if (VDBG) Rlog.v(LOG_TAG, "SMS originating address: "
|
if (VDBG) Rlog.v(LOG_TAG, "SMS originating address: " + mOriginatingAddress.address);
|
||||||
+ mOriginatingAddress.address);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mRecipientAddress != null) {
|
if (mRecipientAddress != null) {
|
||||||
decodeSmsDisplayAddress(mRecipientAddress);
|
decodeSmsDisplayAddress(mRecipientAddress);
|
||||||
|
if (VDBG) Rlog.v(LOG_TAG, "SMS destination address: " + mRecipientAddress.address);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mBearerData.msgCenterTimeStamp != null) {
|
if (mBearerData.msgCenterTimeStamp != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user