Loading core/res/res/values/config.xml +40 −0 Original line number Diff line number Diff line Loading @@ -404,6 +404,46 @@ option to enable/disable read reports is removed in the Messaging app. --> <bool name="config_mms_read_reports_support">true</bool> <!-- National Language Identifier codes for the following two config items. (from 3GPP TS 23.038 V9.1.1 Table 6.2.1.2.4.1): 0 - reserved 1 - Turkish 2 - Spanish (single shift table only) 3 - Portuguese 4 - Bengali 5 - Gujarati 6 - Hindi 7 - Kannada 8 - Malayalam 9 - Oriya 10 - Punjabi 11 - Tamil 12 - Telugu 13 - Urdu 14+ - reserved --> <!-- National language single shift tables to enable for SMS encoding. Decoding is always enabled. 3GPP TS 23.038 states that this feature should not be enabled until a formal request is issued by the relevant national regulatory body. Array elements are codes from the table above. Example 1: devices sold in Turkey must include table 1 to conform with By-Law Number 27230. (http://www.btk.gov.tr/eng/pdf/2009/BY-LAW_SMS.pdf) Example 2: devices sold in India should include tables 4 through 13 to enable use of the new Release 9 tables for Indic languages. --> <integer-array name="config_sms_enabled_single_shift_tables"></integer-array> <!-- National language locking shift tables to enable for SMS encoding. Decoding is always enabled. 3GPP TS 23.038 states that this feature should not be enabled until a formal request is issued by the relevant national regulatory body. Array elements are codes from the table above. Example 1: devices sold in Turkey must include table 1 after the Turkish Telecommunication Authority requires locking shift encoding to be enabled (est. July 2012). (http://www.btk.gov.tr/eng/pdf/2009/BY-LAW_SMS.pdf) See also: http://www.mobitech.com.tr/tr/ersanozturkblog_en/index.php?entry=entry090223-160014 Example 2: devices sold in India should include tables 4 through 13 to enable use of the new Release 9 tables for Indic languages. --> <integer-array name="config_sms_enabled_locking_shift_tables"></integer-array> <!-- Set and Unsets WiMAX --> <bool name="config_wimaxEnabled">false</bool> <!-- Location of the wimax framwork jar location --> Loading services/java/com/android/server/location/GpsLocationProvider.java +3 −8 Original line number Diff line number Diff line Loading @@ -47,30 +47,25 @@ import android.os.SystemClock; import android.os.WorkSource; import android.provider.Settings; import android.provider.Telephony.Sms.Intents; import android.telephony.SmsMessage; import android.telephony.TelephonyManager; import android.telephony.gsm.GsmCellLocation; import android.telephony.SmsMessage; import android.util.Log; import android.util.SparseIntArray; import com.android.internal.app.IBatteryStats; import com.android.internal.telephony.Phone; import com.android.internal.location.GpsNetInitiatedHandler; import com.android.internal.location.GpsNetInitiatedHandler.GpsNiNotification; import com.android.internal.telephony.GsmAlphabet; import com.android.internal.telephony.SmsHeader; import com.android.internal.util.HexDump; import com.android.internal.telephony.Phone; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.StringBufferInputStream; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Date; import java.util.Properties; import java.util.Map.Entry; import java.util.Properties; import java.util.concurrent.CountDownLatch; /** Loading telephony/java/android/telephony/SmsMessage.java +8 −4 Original line number Diff line number Diff line Loading @@ -314,7 +314,8 @@ public class SmsMessage { 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); nextPos = GsmAlphabet.findGsmSeptetLimitIndex(text, pos, limit, ted.languageTable, ted.languageShiftTable); } } else { // Assume unicode. nextPos = pos + Math.min(limit / 2, textLen - pos); Loading Loading @@ -370,7 +371,8 @@ public class SmsMessage { */ /** * Get an SMS-SUBMIT PDU for a destination address and a message * Get an SMS-SUBMIT PDU for a destination address and a message. * This method will not attempt to use any GSM national language 7 bit encodings. * * @param scAddress Service Centre address. Null means use default. * @return a <code>SubmitPdu</code> containing the encoded SC Loading @@ -397,7 +399,8 @@ public class SmsMessage { } /** * Get an SMS-SUBMIT PDU for a destination address and a message * Get an SMS-SUBMIT PDU for a destination address and a message. * This method will not attempt to use any GSM national language 7 bit encodings. * * @param scAddress Service Centre address. Null means use default. * @return a <code>SubmitPdu</code> containing the encoded SC Loading @@ -421,7 +424,8 @@ public class SmsMessage { } /** * Get an SMS-SUBMIT PDU for a data message to a destination address & port * Get an SMS-SUBMIT PDU for a data message to a destination address & port. * This method will not attempt to use any GSM national language 7 bit encodings. * * @param scAddress Service Centre address. null == use default * @param destinationAddress the address of the destination for the message Loading telephony/java/android/telephony/gsm/SmsMessage.java +7 −30 Original line number Diff line number Diff line Loading @@ -297,37 +297,14 @@ public class SmsMessage { */ @Deprecated public static int[] calculateLength(CharSequence messageBody, boolean use7bitOnly) { SmsMessageBase.TextEncodingDetails ted = com.android.internal.telephony.gsm.SmsMessage .calculateLength(messageBody, use7bitOnly); int ret[] = new int[4]; try { // Try GSM alphabet int septets = GsmAlphabet.countGsmSeptets(messageBody, !use7bitOnly); ret[1] = septets; if (septets > MAX_USER_DATA_SEPTETS) { ret[0] = (septets + (MAX_USER_DATA_SEPTETS_WITH_HEADER - 1)) / MAX_USER_DATA_SEPTETS_WITH_HEADER; ret[2] = (ret[0] * MAX_USER_DATA_SEPTETS_WITH_HEADER) - septets; } else { ret[0] = 1; ret[2] = MAX_USER_DATA_SEPTETS - septets; } ret[3] = ENCODING_7BIT; } catch (EncodeException ex) { // fall back to UCS-2 int octets = messageBody.length() * 2; ret[1] = messageBody.length(); if (octets > MAX_USER_DATA_BYTES) { // 6 is the size of the user data header ret[0] = (octets + (MAX_USER_DATA_BYTES_WITH_HEADER - 1)) / MAX_USER_DATA_BYTES_WITH_HEADER; ret[2] = ((ret[0] * MAX_USER_DATA_BYTES_WITH_HEADER) - octets) / 2; } else { ret[0] = 1; ret[2] = (MAX_USER_DATA_BYTES - octets)/2; } ret[3] = ENCODING_16BIT; } ret[0] = ted.msgCount; ret[1] = ted.codeUnitCount; ret[2] = ted.codeUnitsRemaining; ret[3] = ted.codeUnitSize; return ret; } Loading telephony/java/com/android/internal/telephony/GsmAlphabet.java +866 −277 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
core/res/res/values/config.xml +40 −0 Original line number Diff line number Diff line Loading @@ -404,6 +404,46 @@ option to enable/disable read reports is removed in the Messaging app. --> <bool name="config_mms_read_reports_support">true</bool> <!-- National Language Identifier codes for the following two config items. (from 3GPP TS 23.038 V9.1.1 Table 6.2.1.2.4.1): 0 - reserved 1 - Turkish 2 - Spanish (single shift table only) 3 - Portuguese 4 - Bengali 5 - Gujarati 6 - Hindi 7 - Kannada 8 - Malayalam 9 - Oriya 10 - Punjabi 11 - Tamil 12 - Telugu 13 - Urdu 14+ - reserved --> <!-- National language single shift tables to enable for SMS encoding. Decoding is always enabled. 3GPP TS 23.038 states that this feature should not be enabled until a formal request is issued by the relevant national regulatory body. Array elements are codes from the table above. Example 1: devices sold in Turkey must include table 1 to conform with By-Law Number 27230. (http://www.btk.gov.tr/eng/pdf/2009/BY-LAW_SMS.pdf) Example 2: devices sold in India should include tables 4 through 13 to enable use of the new Release 9 tables for Indic languages. --> <integer-array name="config_sms_enabled_single_shift_tables"></integer-array> <!-- National language locking shift tables to enable for SMS encoding. Decoding is always enabled. 3GPP TS 23.038 states that this feature should not be enabled until a formal request is issued by the relevant national regulatory body. Array elements are codes from the table above. Example 1: devices sold in Turkey must include table 1 after the Turkish Telecommunication Authority requires locking shift encoding to be enabled (est. July 2012). (http://www.btk.gov.tr/eng/pdf/2009/BY-LAW_SMS.pdf) See also: http://www.mobitech.com.tr/tr/ersanozturkblog_en/index.php?entry=entry090223-160014 Example 2: devices sold in India should include tables 4 through 13 to enable use of the new Release 9 tables for Indic languages. --> <integer-array name="config_sms_enabled_locking_shift_tables"></integer-array> <!-- Set and Unsets WiMAX --> <bool name="config_wimaxEnabled">false</bool> <!-- Location of the wimax framwork jar location --> Loading
services/java/com/android/server/location/GpsLocationProvider.java +3 −8 Original line number Diff line number Diff line Loading @@ -47,30 +47,25 @@ import android.os.SystemClock; import android.os.WorkSource; import android.provider.Settings; import android.provider.Telephony.Sms.Intents; import android.telephony.SmsMessage; import android.telephony.TelephonyManager; import android.telephony.gsm.GsmCellLocation; import android.telephony.SmsMessage; import android.util.Log; import android.util.SparseIntArray; import com.android.internal.app.IBatteryStats; import com.android.internal.telephony.Phone; import com.android.internal.location.GpsNetInitiatedHandler; import com.android.internal.location.GpsNetInitiatedHandler.GpsNiNotification; import com.android.internal.telephony.GsmAlphabet; import com.android.internal.telephony.SmsHeader; import com.android.internal.util.HexDump; import com.android.internal.telephony.Phone; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.StringBufferInputStream; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Date; import java.util.Properties; import java.util.Map.Entry; import java.util.Properties; import java.util.concurrent.CountDownLatch; /** Loading
telephony/java/android/telephony/SmsMessage.java +8 −4 Original line number Diff line number Diff line Loading @@ -314,7 +314,8 @@ public class SmsMessage { 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); nextPos = GsmAlphabet.findGsmSeptetLimitIndex(text, pos, limit, ted.languageTable, ted.languageShiftTable); } } else { // Assume unicode. nextPos = pos + Math.min(limit / 2, textLen - pos); Loading Loading @@ -370,7 +371,8 @@ public class SmsMessage { */ /** * Get an SMS-SUBMIT PDU for a destination address and a message * Get an SMS-SUBMIT PDU for a destination address and a message. * This method will not attempt to use any GSM national language 7 bit encodings. * * @param scAddress Service Centre address. Null means use default. * @return a <code>SubmitPdu</code> containing the encoded SC Loading @@ -397,7 +399,8 @@ public class SmsMessage { } /** * Get an SMS-SUBMIT PDU for a destination address and a message * Get an SMS-SUBMIT PDU for a destination address and a message. * This method will not attempt to use any GSM national language 7 bit encodings. * * @param scAddress Service Centre address. Null means use default. * @return a <code>SubmitPdu</code> containing the encoded SC Loading @@ -421,7 +424,8 @@ public class SmsMessage { } /** * Get an SMS-SUBMIT PDU for a data message to a destination address & port * Get an SMS-SUBMIT PDU for a data message to a destination address & port. * This method will not attempt to use any GSM national language 7 bit encodings. * * @param scAddress Service Centre address. null == use default * @param destinationAddress the address of the destination for the message Loading
telephony/java/android/telephony/gsm/SmsMessage.java +7 −30 Original line number Diff line number Diff line Loading @@ -297,37 +297,14 @@ public class SmsMessage { */ @Deprecated public static int[] calculateLength(CharSequence messageBody, boolean use7bitOnly) { SmsMessageBase.TextEncodingDetails ted = com.android.internal.telephony.gsm.SmsMessage .calculateLength(messageBody, use7bitOnly); int ret[] = new int[4]; try { // Try GSM alphabet int septets = GsmAlphabet.countGsmSeptets(messageBody, !use7bitOnly); ret[1] = septets; if (septets > MAX_USER_DATA_SEPTETS) { ret[0] = (septets + (MAX_USER_DATA_SEPTETS_WITH_HEADER - 1)) / MAX_USER_DATA_SEPTETS_WITH_HEADER; ret[2] = (ret[0] * MAX_USER_DATA_SEPTETS_WITH_HEADER) - septets; } else { ret[0] = 1; ret[2] = MAX_USER_DATA_SEPTETS - septets; } ret[3] = ENCODING_7BIT; } catch (EncodeException ex) { // fall back to UCS-2 int octets = messageBody.length() * 2; ret[1] = messageBody.length(); if (octets > MAX_USER_DATA_BYTES) { // 6 is the size of the user data header ret[0] = (octets + (MAX_USER_DATA_BYTES_WITH_HEADER - 1)) / MAX_USER_DATA_BYTES_WITH_HEADER; ret[2] = ((ret[0] * MAX_USER_DATA_BYTES_WITH_HEADER) - octets) / 2; } else { ret[0] = 1; ret[2] = (MAX_USER_DATA_BYTES - octets)/2; } ret[3] = ENCODING_16BIT; } ret[0] = ted.msgCount; ret[1] = ted.codeUnitCount; ret[2] = ted.codeUnitsRemaining; ret[3] = ted.codeUnitSize; return ret; } Loading
telephony/java/com/android/internal/telephony/GsmAlphabet.java +866 −277 File changed.Preview size limit exceeded, changes collapsed. Show changes