Merge change 2758 into donut
* changes: Fix concat SMS for GSM.
This commit is contained in:
@@ -152,7 +152,13 @@ final class GsmSMSDispatcher extends SMSDispatcher {
|
||||
concatRef.refNumber = refNumber;
|
||||
concatRef.seqNumber = i + 1; // 1-based sequence
|
||||
concatRef.msgCount = msgCount;
|
||||
concatRef.isEightBits = false;
|
||||
// TODO: We currently set this to true since our messaging app will never
|
||||
// send more than 255 parts (it converts the message to MMS well before that).
|
||||
// However, we should support 3rd party messaging apps that might need 16-bit
|
||||
// references
|
||||
// Note: It's not sufficient to just flip this bit to true; it will have
|
||||
// ripple effects (several calculations assume 8-bit ref).
|
||||
concatRef.isEightBits = true;
|
||||
SmsHeader smsHeader = new SmsHeader();
|
||||
smsHeader.concatRef = concatRef;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class GsmAlphabetTest extends TestCase {
|
||||
SmsHeader.toByteArray(header));
|
||||
int septetCount = GsmAlphabet.countGsmSeptets(message, false);
|
||||
String parsedMessage = GsmAlphabet.gsm7BitPackedToString(
|
||||
userData, SmsHeader.toByteArray(header).length+1, septetCount, 1);
|
||||
userData, SmsHeader.toByteArray(header).length+2, septetCount, 1);
|
||||
assertEquals(message, parsedMessage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user