Adding a new param to calculateLength for SMS to indicate if called for a
segment of multipart msg.
Encoding type is calculated separately for entire msg vs individual
segments. Change is to avoid overwriting the calculated value for
individual segment based.
Bug: 19399335
Change-Id: I8e89b7596e9c7440ace0486eceb1252094c373fa
diff --git a/src/com/android/bluetooth/map/BluetoothMapSmsPdu.java b/src/com/android/bluetooth/map/BluetoothMapSmsPdu.java
index 5b7b8db..4428874 100644
--- a/src/com/android/bluetooth/map/BluetoothMapSmsPdu.java
+++ b/src/com/android/bluetooth/map/BluetoothMapSmsPdu.java
@@ -482,7 +482,7 @@
int activePhone = TelephonyManager.getDefault().getCurrentPhoneType(); // TODO: Change to use: ((TelephonyManager)myContext.getSystemService(Context.TELEPHONY_SERVICE))
int phoneType;
GsmAlphabet.TextEncodingDetails ted = (PHONE_TYPE_CDMA == activePhone) ?
- com.android.internal.telephony.cdma.SmsMessage.calculateLength((CharSequence)messageText, false) :
+ com.android.internal.telephony.cdma.SmsMessage.calculateLength((CharSequence)messageText, false, true) :
com.android.internal.telephony.gsm.SmsMessage.calculateLength((CharSequence)messageText, false);
SmsPdu newPdu;