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

Commit ddeba83b authored by Jake Hamby's avatar Jake Hamby Committed by Gerrit Code Review
Browse files

Merge "Consider EF-SMS for both gsm and cdma"

parents 9e6a8351 0e4839f1
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -489,7 +489,12 @@ public class IccSmsInterfaceManager extends ISms.Stub {
     * @return byte array for the record.
     * @return byte array for the record.
     */
     */
    protected byte[] makeSmsRecordData(int status, byte[] pdu) {
    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
        // Status bits for this record.  See TS 51.011 10.5.3
        data[0] = (byte)(status & 7);
        data[0] = (byte)(status & 7);
@@ -497,7 +502,7 @@ public class IccSmsInterfaceManager extends ISms.Stub {
        System.arraycopy(pdu, 0, data, 1, pdu.length);
        System.arraycopy(pdu, 0, data, 1, pdu.length);


        // Pad out with 0xFF's.
        // 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;
            data[j] = -1;
        }
        }


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


    // SMS record length from TS 51.011 10.5.3
    // SMS record length from TS 51.011 10.5.3
    static public final int SMS_RECORD_LENGTH = 176;
    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 MF_SIM = "3F00";
    static final String DF_TELECOM = "7F10";
    static final String DF_TELECOM = "7F10";