summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/map/BluetoothMapbMessageSms.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/bluetooth/map/BluetoothMapbMessageSms.java')
-rw-r--r--src/com/android/bluetooth/map/BluetoothMapbMessageSms.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapbMessageSms.java b/src/com/android/bluetooth/map/BluetoothMapbMessageSms.java
index 8107bd8fe..9f57f60f4 100644
--- a/src/com/android/bluetooth/map/BluetoothMapbMessageSms.java
+++ b/src/com/android/bluetooth/map/BluetoothMapbMessageSms.java
@@ -24,29 +24,29 @@ import com.android.bluetooth.map.BluetoothMapUtils.TYPE;
public class BluetoothMapbMessageSms extends BluetoothMapbMessage {
- private ArrayList<SmsPdu> smsBodyPdus = null;
- private String smsBody = null;
+ private ArrayList<SmsPdu> mSmsBodyPdus = null;
+ private String mSmsBody = null;
public void setSmsBodyPdus(ArrayList<SmsPdu> smsBodyPdus) {
- this.smsBodyPdus = smsBodyPdus;
- this.charset = null;
+ this.mSmsBodyPdus = smsBodyPdus;
+ this.mCharset = null;
if(smsBodyPdus.size() > 0)
- this.encoding = smsBodyPdus.get(0).getEncodingString();
+ this.mEncoding = smsBodyPdus.get(0).getEncodingString();
}
public String getSmsBody() {
- return smsBody;
+ return mSmsBody;
}
public void setSmsBody(String smsBody) {
- this.smsBody = smsBody;
- this.charset = "UTF-8";
- this.encoding = null;
+ this.mSmsBody = smsBody;
+ this.mCharset = "UTF-8";
+ this.mEncoding = null;
}
@Override
public void parseMsgPart(String msgPart) {
- if(appParamCharset == BluetoothMapAppParams.CHARSET_NATIVE) {
+ if(mAppParamCharset == BluetoothMapAppParams.CHARSET_NATIVE) {
if(D) Log.d(TAG, "Decoding \"" + msgPart + "\" as native PDU");
byte[] msgBytes = decodeBinary(msgPart);
if(msgBytes.length > 0 &&
@@ -56,16 +56,16 @@ public class BluetoothMapbMessageSms extends BluetoothMapbMessage {
throw new IllegalArgumentException("Only submit PDUs are supported");
}
- smsBody += BluetoothMapSmsPdu.decodePdu(msgBytes,
- type == TYPE.SMS_CDMA ? BluetoothMapSmsPdu.SMS_TYPE_CDMA
+ mSmsBody += BluetoothMapSmsPdu.decodePdu(msgBytes,
+ mType == TYPE.SMS_CDMA ? BluetoothMapSmsPdu.SMS_TYPE_CDMA
: BluetoothMapSmsPdu.SMS_TYPE_GSM);
} else {
- smsBody += msgPart;
+ mSmsBody += msgPart;
}
}
@Override
public void parseMsgInit() {
- smsBody = "";
+ mSmsBody = "";
}
public byte[] encode() throws UnsupportedEncodingException
@@ -75,16 +75,16 @@ public class BluetoothMapbMessageSms extends BluetoothMapbMessage {
/* Store the messages in an ArrayList to be able to handle the different message types in a generic way.
* We use byte[] since we need to extract the length in bytes.
*/
- if(smsBody != null) {
- String tmpBody = smsBody.replaceAll("END:MSG", "/END\\:MSG"); // Replace any occurrences of END:MSG with \END:MSG
+ if(mSmsBody != null) {
+ String tmpBody = mSmsBody.replaceAll("END:MSG", "/END\\:MSG"); // Replace any occurrences of END:MSG with \END:MSG
bodyFragments.add(tmpBody.getBytes("UTF-8"));
- }else if (smsBodyPdus != null && smsBodyPdus.size() > 0) {
- for (SmsPdu pdu : smsBodyPdus) {
+ }else if (mSmsBodyPdus != null && mSmsBodyPdus.size() > 0) {
+ for (SmsPdu pdu : mSmsBodyPdus) {
// This cannot(must not) contain END:MSG
bodyFragments.add(encodeBinary(pdu.getData(),pdu.getScAddress()).getBytes("UTF-8"));
}
} else {
- bodyFragments.add(new byte[0]); // TODO: Is this allowed? (An empty message)
+ bodyFragments.add(new byte[0]); // An empty message - no text
}
return encodeGeneric(bodyFragments);