Enable support for SMS national language shift tables.
Add support for encoding and decoding SMS 7 bit user data using the national language shift tables defined in 3GPP TS 23.038 (GSM/UMTS only), including the new tables added in Release 9 for Indic languages. Decoding is always supported, but encoding is only enabled for the specific language tables added to the new integer array resources "config_sms_enabled_single_shift_tables" and "config_sms_enabled_locking_shift_tables" defined in frameworks/base/core/res/res/values/config.xml. The default empty arrays should be overridden in an OEM overlay for the specific nationalities where SMS national language shift table encoding is allowed/mandated (e.g. Turkey). GsmAlphabet.countGsmSeptets() will try to find the most efficient encoding among all combinations of enabled locking shift and single shift tables. If no 7 bit encoding is possible, 16 bit UCS-2 encoding will be used. This change also fixes a bug in the decoder: when an escape septet is followed by a septet with no entry in the extension (single shift) table, TS 23.038 Table 6.2.1.1 states that the MS shall display the character in the main GSM 7 bit default alphabet table, or the active national language locking shift table. Previously, we were decoding this sequence as a space character. Two consecutive escape septets will continue to decode as a space character, according to Note 1 of table 6.2.1.1. Change-Id: I4dab3f0ffe39f3df2064ed93c9c05f26e274d18b
Loading
Please register or sign in to comment