Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed38d9d3 authored by Jake Hamby's avatar Jake Hamby Committed by Android Git Automerger
Browse files

am f39de086: am ddeba83b: Merge "Consider EF-SMS for both gsm and cdma"

* commit 'f39de086':
  Consider EF-SMS for both gsm and cdma
parents fd5b8d87 f39de086
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -483,7 +483,12 @@ public class IccSmsInterfaceManager extends ISms.Stub {
     * @return byte array for the record.
     */
    protected byte[] makeSmsRecordData(int status, byte[] pdu) {
        byte[] data = new byte[IccConstants.SMS_RECORD_LENGTH];
        byte[] data;
        if (PhoneConstants.PHONE_TYPE_GSM == mPhone.getPhoneType()) {
            data = new byte[IccConstants.SMS_RECORD_LENGTH];
        } else {
            data = new byte[IccConstants.CDMA_SMS_RECORD_LENGTH];
        }

        // Status bits for this record.  See TS 51.011 10.5.3
        data[0] = (byte)(status & 7);
@@ -491,7 +496,7 @@ public class IccSmsInterfaceManager extends ISms.Stub {
        System.arraycopy(pdu, 0, data, 1, pdu.length);

        // Pad out with 0xFF's.
        for (int j = pdu.length+1; j < IccConstants.SMS_RECORD_LENGTH; j++) {
        for (int j = pdu.length+1; j < data.length; j++) {
            data[j] = -1;
        }

+2 −0
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@ public interface IccConstants {

    // SMS record length from TS 51.011 10.5.3
    static public final int SMS_RECORD_LENGTH = 176;
    // SMS record length from C.S0023 3.4.27
    static public final int CDMA_SMS_RECORD_LENGTH = 255;

    static final String MF_SIM = "3F00";
    static final String DF_TELECOM = "7F10";