Skip to content

Commit d8e147c

Browse files
author
Jake Hamby
committed
Add wrapper method to GsmAlphabet for API compatibility.
An internal method was changed to add parameters to support a new feature (7-bit national language tables). Add a compatibility wrapper for the original method signature, which is used by OEM code. Bug: 5334032 Change-Id: I1acba369b1c1da52c4a950fd4ae21d693652e9c5
1 parent 11116b8 commit d8e147c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

telephony/java/com/android/internal/telephony/GsmAlphabet.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,24 @@ private GsmAlphabet() { }
204204
}
205205
}
206206

207+
/**
208+
* Converts a String into a byte array containing the 7-bit packed
209+
* GSM Alphabet representation of the string. If a header is provided,
210+
* this is included in the returned byte array and padded to a septet
211+
* boundary. This method is used by OEM code.
212+
*
213+
* @param data The text string to encode.
214+
* @param header Optional header (including length byte) that precedes
215+
* the encoded data, padded to septet boundary.
216+
* @return Byte array containing header and encoded data.
217+
* @throws EncodeException if String is too large to encode
218+
* @see #stringToGsm7BitPackedWithHeader(String, byte[], int, int)
219+
*/
220+
public static byte[] stringToGsm7BitPackedWithHeader(String data, byte[] header)
221+
throws EncodeException {
222+
return stringToGsm7BitPackedWithHeader(data, header, 0, 0);
223+
}
224+
207225
/**
208226
* Converts a String into a byte array containing the 7-bit packed
209227
* GSM Alphabet representation of the string. If a header is provided,

0 commit comments

Comments
 (0)