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

Commit cc8c6496 authored by Jake Hamby's avatar Jake Hamby
Browse files

resolved conflicts for merge of 3543a40b to master

Change-Id: I307c8f1277b84763e537ced0ac3410ec06fce431
parents 42ca268c 3543a40b
Loading
Loading
Loading
Loading
+21 −7
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@ import com.android.internal.telephony.SmsMessageBase;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.cdma.sms.BearerData;
import com.android.internal.telephony.cdma.sms.BearerData;
import com.android.internal.telephony.cdma.sms.CdmaSmsAddress;
import com.android.internal.telephony.cdma.sms.CdmaSmsAddress;
import com.android.internal.telephony.cdma.sms.CdmaSmsSubaddress;
import com.android.internal.telephony.cdma.sms.SmsEnvelope;
import com.android.internal.telephony.cdma.sms.SmsEnvelope;
import com.android.internal.telephony.cdma.sms.UserData;
import com.android.internal.telephony.cdma.sms.UserData;
import com.android.internal.util.HexDump;
import com.android.internal.util.HexDump;
@@ -134,6 +135,7 @@ public class SmsMessage extends SmsMessageBase {
        SmsMessage msg = new SmsMessage();
        SmsMessage msg = new SmsMessage();
        SmsEnvelope env = new SmsEnvelope();
        SmsEnvelope env = new SmsEnvelope();
        CdmaSmsAddress addr = new CdmaSmsAddress();
        CdmaSmsAddress addr = new CdmaSmsAddress();
        CdmaSmsSubaddress subaddr = new CdmaSmsSubaddress();
        byte[] data;
        byte[] data;
        byte count;
        byte count;
        int countInt;
        int countInt;
@@ -176,15 +178,24 @@ public class SmsMessage extends SmsMessageBase {


        addr.origBytes = data;
        addr.origBytes = data;


        // ignore subaddress
        subaddr.type = p.readInt(); // p_cur->sSubAddress.subaddressType
        p.readInt(); //p_cur->sSubAddress.subaddressType
        subaddr.odd = p.readByte();     // p_cur->sSubAddress.odd
        p.readInt(); //p_cur->sSubAddress.odd
        count = p.readByte();           // p_cur->sSubAddress.number_of_digits
        count = p.readByte();           // p_cur->sSubAddress.number_of_digits

        if (count < 0) {
            count = 0;
        }

        // p_cur->sSubAddress.digits[digitCount] :
        // p_cur->sSubAddress.digits[digitCount] :
        for (int index=0; index < count; index++) {

            p.readByte();
        data = new byte[count];

        for (int index = 0; index < count; ++index) {
            data[index] = p.readByte();
        }
        }


        subaddr.origBytes = data;

        /* currently not supported by the modem-lib:
        /* currently not supported by the modem-lib:
            env.bearerReply
            env.bearerReply
            env.replySeqNo
            env.replySeqNo
@@ -206,6 +217,7 @@ public class SmsMessage extends SmsMessageBase {


        // link the the filled objects to the SMS
        // link the the filled objects to the SMS
        env.origAddress = addr;
        env.origAddress = addr;
        env.origSubaddress = subaddr;
        msg.originatingAddress = addr;
        msg.originatingAddress = addr;
        msg.mEnvelope = env;
        msg.mEnvelope = env;


@@ -814,6 +826,8 @@ public class SmsMessage extends SmsMessageBase {
        output.write(mEnvelope.teleService);
        output.write(mEnvelope.teleService);
        output.write(mEnvelope.origAddress.origBytes, 0, mEnvelope.origAddress.origBytes.length);
        output.write(mEnvelope.origAddress.origBytes, 0, mEnvelope.origAddress.origBytes.length);
        output.write(mEnvelope.bearerData, 0, mEnvelope.bearerData.length);
        output.write(mEnvelope.bearerData, 0, mEnvelope.bearerData.length);
        output.write(mEnvelope.origSubaddress.origBytes, 0,
                mEnvelope.origSubaddress.origBytes.length);


        return output.toByteArray();
        return output.toByteArray();
    }
    }
+27 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2010 The Android Open Source Project. All rights reserved.
 * Copyright (C) 2010 Code Aurora Forum. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.internal.telephony.cdma.sms;

public class CdmaSmsSubaddress {
    public int type;

    public byte odd;

    public byte[] origBytes;
}
+10 −2
Original line number Original line Diff line number Diff line
@@ -17,6 +17,8 @@
package com.android.internal.telephony.cdma.sms;
package com.android.internal.telephony.cdma.sms;




import com.android.internal.telephony.cdma.sms.CdmaSmsSubaddress;

public final class SmsEnvelope {
public final class SmsEnvelope {
    /**
    /**
     * Message Types
     * Message Types
@@ -74,16 +76,22 @@ public final class SmsEnvelope {


    /**
    /**
     * The origination address identifies the originator of the SMS message.
     * The origination address identifies the originator of the SMS message.
     * (See 3GPP2 C.S0015-B, v2, 3.4.3.4)
     * (See 3GPP2 C.S0015-B, v2, 3.4.3.3)
     */
     */
    public CdmaSmsAddress origAddress;
    public CdmaSmsAddress origAddress;


    /**
    /**
     * The destination address identifies the target of the SMS message.
     * The destination address identifies the target of the SMS message.
     * (See 3GPP2 C.S0015-B, v2, 3.4.3.4)
     * (See 3GPP2 C.S0015-B, v2, 3.4.3.3)
     */
     */
    public CdmaSmsAddress destAddress;
    public CdmaSmsAddress destAddress;


    /**
     * The origination subaddress identifies the originator of the SMS message.
     * (See 3GPP2 C.S0015-B, v2, 3.4.3.4)
     */
    public CdmaSmsSubaddress origSubaddress;

    /**
    /**
     * The 6-bit bearer reply parameter is used to request the return of a
     * The 6-bit bearer reply parameter is used to request the return of a
     * SMS Acknowledge Message.
     * SMS Acknowledge Message.