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

Commit 874b62e4 authored by Pavel Zhamaitsiak's avatar Pavel Zhamaitsiak Committed by Android Partner Code Review
Browse files

Merge "Modify CommandsInterface.setupDataCall()" into mm-wireless-dev

parents 2a703488 5d5ec64f
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1595,10 +1595,9 @@ public interface CommandsInterface {
     * object containing the connection information.
     *
     * @param radioTechnology
     *            indicates whether to setup connection on radio technology CDMA
     *            (0) or GSM/UMTS (1)
     *            Radio technology to use. Values is one of RIL_RADIO_TECHNOLOGY_*
     * @param profile
     *            Profile Number or NULL to indicate default profile
     *            Profile Number. Values is one of DATA_PROFILE_*
     * @param apn
     *            the APN to connect to if radio technology is GSM/UMTS.
     *            Otherwise null for CDMA.
@@ -1614,8 +1613,8 @@ public interface CommandsInterface {
     * @param result
     *            Callback message
     */
    public void setupDataCall(String radioTechnology, String profile,
            String apn, String user, String password, String authType,
    public void setupDataCall(int radioTechnology, int profile,
            String apn, String user, String password, int authType,
            String protocol, Message result);

    /**
+7 −15
Original line number Diff line number Diff line
@@ -1535,20 +1535,20 @@ public final class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void
    setupDataCall(String radioTechnology, String profile, String apn,
            String user, String password, String authType, String protocol,
    setupDataCall(int radioTechnology, int profile, String apn,
            String user, String password, int authType, String protocol,
            Message result) {
        RILRequest rr
                = RILRequest.obtain(RIL_REQUEST_SETUP_DATA_CALL, result);

        rr.mParcel.writeInt(7);

        rr.mParcel.writeString(radioTechnology);
        rr.mParcel.writeString(profile);
        rr.mParcel.writeString(Integer.toString(radioTechnology + 2));
        rr.mParcel.writeString(Integer.toString(profile));
        rr.mParcel.writeString(apn);
        rr.mParcel.writeString(user);
        rr.mParcel.writeString(password);
        rr.mParcel.writeString(authType);
        rr.mParcel.writeString(Integer.toString(authType));
        rr.mParcel.writeString(protocol);

        if (RILJ_LOGD) riljLog(rr.serialString() + "> "
@@ -1556,16 +1556,8 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                + profile + " " + apn + " " + user + " "
                + password + " " + authType + " " + protocol);

        // The first parameter passed to RIL_REQUEST_SETUP_DATA_CALL can be:
        //     0 - for CDMA
        //     1 - for GSM/UMTS
        //   >=2 - RIL_RadioTechnology+2
        // The framework never passes 0 or 1, so by subtracting 2 we convert this parameter
        // to RIL_RadioTechnology.
        final int rilRat = Integer.parseInt(radioTechnology) - 2;

        mEventLog.writeRilSetupDataCall(rr.mSerial, rilRat, Integer.parseInt(profile), apn,
                user, password, Integer.parseInt(authType), protocol);
        mEventLog.writeRilSetupDataCall(rr.mSerial, radioTechnology, profile, apn,
                user, password, authType, protocol);

        send(rr);
    }
+3 −3
Original line number Diff line number Diff line
@@ -484,10 +484,10 @@ public final class DataConnection extends StateMachine {
        }

        mPhone.mCi.setupDataCall(
                Integer.toString(cp.mRilRat + 2),
                Integer.toString(cp.mProfileId),
                cp.mRilRat,
                cp.mProfileId,
                mApnSetting.apn, mApnSetting.user, mApnSetting.password,
                Integer.toString(authType),
                authType,
                protocol, msg);
    }

+2 −2
Original line number Diff line number Diff line
@@ -255,8 +255,8 @@ class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface
    }

    @Override
    public void setupDataCall(String radioTechnology, String profile,
            String apn, String user, String password, String authType,
    public void setupDataCall(int radioTechnology, int profile,
            String apn, String user, String password, int authType,
            String protocol, Message result) {
    }

+2 −2
Original line number Diff line number Diff line
@@ -256,8 +256,8 @@ class SipCommandInterface extends BaseCommands implements CommandsInterface {
    }

    @Override
    public void setupDataCall(String radioTechnology, String profile,
            String apn, String user, String password, String authType,
    public void setupDataCall(int radioTechnology, int profile,
            String apn, String user, String password, int authType,
            String protocol, Message result) {
    }

Loading