Allow fragmentText to be called for singleton CDMA messages.
Corrects for previous partner changes, addressing issue: http://buganizer/issue?id=2063332 Change-Id: I49e564d81c5db3e92a6bad973f21a02a7302875d
This commit is contained in:
@@ -309,8 +309,13 @@ public class SmsMessage {
|
||||
while (pos < textLen) {
|
||||
int nextPos = 0; // Counts code units.
|
||||
if (ted.codeUnitSize == ENCODING_7BIT) {
|
||||
// For multi-segment messages, CDMA 7bit equals GSM 7bit encoding (EMS mode).
|
||||
nextPos = GsmAlphabet.findGsmSeptetLimitIndex(text, pos, limit);
|
||||
if (activePhone == PHONE_TYPE_CDMA && ted.msgCount == 1) {
|
||||
// For a singleton CDMA message, the encoding must be ASCII...
|
||||
nextPos = pos + Math.min(limit, textLen - pos);
|
||||
} else {
|
||||
// For multi-segment messages, CDMA 7bit equals GSM 7bit encoding (EMS mode).
|
||||
nextPos = GsmAlphabet.findGsmSeptetLimitIndex(text, pos, limit);
|
||||
}
|
||||
} else { // Assume unicode.
|
||||
nextPos = pos + Math.min(limit / 2, textLen - pos);
|
||||
}
|
||||
|
||||
@@ -116,6 +116,16 @@ public abstract class SmsMessageBase {
|
||||
* android.telephony.SmsMessage ENCODING_*).
|
||||
*/
|
||||
public int codeUnitSize;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TextEncodingDetails " +
|
||||
"{ msgCount=" + msgCount +
|
||||
", codeUnitCount=" + codeUnitCount +
|
||||
", codeUnitsRemaining=" + codeUnitsRemaining +
|
||||
", codeUnitSize=" + codeUnitSize +
|
||||
" }";
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(): This class is duplicated in SmsMessage.java. Refactor accordingly.
|
||||
|
||||
Reference in New Issue
Block a user