File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
telephony/java/com/android/internal/telephony Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments