diff options
author | Jake Hamby <jhamby@google.com> | 2011-10-18 12:22:39 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-18 12:22:39 -0700 |
commit | f522e095e69406a5c6039b406237e9b30781a355 (patch) | |
tree | cdb0341907dbf95afa67f6d1307d6505eeea5766 /telephony | |
parent | 601d5817301bc79c34c30e7b606fe872b2b76c31 (diff) | |
parent | d8e147ce79e8424d22be501c87e43cd8f2427ddb (diff) | |
download | frameworks_base-f522e095e69406a5c6039b406237e9b30781a355.zip frameworks_base-f522e095e69406a5c6039b406237e9b30781a355.tar.gz frameworks_base-f522e095e69406a5c6039b406237e9b30781a355.tar.bz2 |
Merge "Add wrapper method to GsmAlphabet for API compatibility." into ics-mr0
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/GsmAlphabet.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/GsmAlphabet.java b/telephony/java/com/android/internal/telephony/GsmAlphabet.java index a3f4f1f..2e99849 100644 --- a/telephony/java/com/android/internal/telephony/GsmAlphabet.java +++ b/telephony/java/com/android/internal/telephony/GsmAlphabet.java @@ -208,6 +208,24 @@ public class GsmAlphabet { * Converts a String into a byte array containing the 7-bit packed * GSM Alphabet representation of the string. If a header is provided, * this is included in the returned byte array and padded to a septet + * boundary. This method is used by OEM code. + * + * @param data The text string to encode. + * @param header Optional header (including length byte) that precedes + * the encoded data, padded to septet boundary. + * @return Byte array containing header and encoded data. + * @throws EncodeException if String is too large to encode + * @see #stringToGsm7BitPackedWithHeader(String, byte[], int, int) + */ + public static byte[] stringToGsm7BitPackedWithHeader(String data, byte[] header) + throws EncodeException { + return stringToGsm7BitPackedWithHeader(data, header, 0, 0); + } + + /** + * Converts a String into a byte array containing the 7-bit packed + * GSM Alphabet representation of the string. If a header is provided, + * this is included in the returned byte array and padded to a septet * boundary. * * Unencodable chars are encoded as spaces |