diff options
Diffstat (limited to 'telephony/java/com/android/internal/telephony/SmsHeader.java')
-rw-r--r-- | telephony/java/com/android/internal/telephony/SmsHeader.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/SmsHeader.java b/telephony/java/com/android/internal/telephony/SmsHeader.java index 7a65162..9492e0e 100644 --- a/telephony/java/com/android/internal/telephony/SmsHeader.java +++ b/telephony/java/com/android/internal/telephony/SmsHeader.java @@ -66,6 +66,8 @@ public class SmsHeader { public static final int ELT_ID_HYPERLINK_FORMAT_ELEMENT = 0x21; public static final int ELT_ID_REPLY_ADDRESS_ELEMENT = 0x22; public static final int ELT_ID_ENHANCED_VOICE_MAIL_INFORMATION = 0x23; + public static final int ELT_ID_NATIONAL_LANGUAGE_SINGLE_SHIFT = 0x24; + public static final int ELT_ID_NATIONAL_LANGUAGE_LOCKING_SHIFT = 0x25; public static final int PORT_WAP_PUSH = 2948; public static final int PORT_WAP_WSP = 9200; @@ -96,6 +98,12 @@ public class SmsHeader { public ConcatRef concatRef; public ArrayList<MiscElt> miscEltList = new ArrayList<MiscElt>(); + /** 7 bit national language locking shift table, or 0 for GSM default 7 bit alphabet. */ + public int languageTable; + + /** 7 bit national language single shift table, or 0 for GSM default 7 bit extension table. */ + public int languageShiftTable; + public SmsHeader() {} /** @@ -157,6 +165,12 @@ public class SmsHeader { portAddrs.areEightBits = false; smsHeader.portAddrs = portAddrs; break; + case ELT_ID_NATIONAL_LANGUAGE_SINGLE_SHIFT: + smsHeader.languageShiftTable = inStream.read(); + break; + case ELT_ID_NATIONAL_LANGUAGE_LOCKING_SHIFT: + smsHeader.languageTable = inStream.read(); + break; default: MiscElt miscElt = new MiscElt(); miscElt.id = id; @@ -212,6 +226,16 @@ public class SmsHeader { outStream.write(portAddrs.origPort & 0x00FF); } } + if (smsHeader.languageShiftTable != 0) { + outStream.write(ELT_ID_NATIONAL_LANGUAGE_SINGLE_SHIFT); + outStream.write(1); + outStream.write(smsHeader.languageShiftTable); + } + if (smsHeader.languageTable != 0) { + outStream.write(ELT_ID_NATIONAL_LANGUAGE_LOCKING_SHIFT); + outStream.write(1); + outStream.write(smsHeader.languageTable); + } for (MiscElt miscElt : smsHeader.miscEltList) { outStream.write(miscElt.id); outStream.write(miscElt.data.length); @@ -243,6 +267,12 @@ public class SmsHeader { builder.append(", areEightBits=" + portAddrs.areEightBits); builder.append(" }"); } + if (languageShiftTable != 0) { + builder.append(", languageShiftTable=" + languageShiftTable); + } + if (languageTable != 0) { + builder.append(", languageTable=" + languageTable); + } for (MiscElt miscElt : miscEltList) { builder.append(", MiscElt "); builder.append("{ id=" + miscElt.id); |