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

Commit 21320993 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

QualcommRIL: Update getDataState override

Verification of the dataCall.active status was added to the RIL super
class in change Iea75053cb8226ec15d2a2c11a73332e5ebe8c793, so we can
now fall back to it

Change-Id: Ib04057ec09549c0c79a4e4e1d89e2aa480e1890f
parent 271e79c6
Loading
Loading
Loading
Loading
+0 −43
Original line number Diff line number Diff line
@@ -41,49 +41,6 @@ public class HTCQualcommRIL extends QualcommSharedRIL implements CommandsInterfa
        super(context, networkMode, cdmaSubscription);
    }

    @Override
    protected DataCallState
    getDataCallState(Parcel p, int version) {
        DataCallState dataCall = new DataCallState();
        dataCall.version = version;

        if (version < 5) {
            dataCall.cid = p.readInt();
            dataCall.active = p.readInt();
            dataCall.type = p.readString();
            String addresses = p.readString();
            if (!TextUtils.isEmpty(addresses)) {
                dataCall.addresses = addresses.split(" ");
            }
        } else {
            dataCall.status = p.readInt();
            dataCall.suggestedRetryTime = p.readInt();
            dataCall.cid = p.readInt();
            dataCall.active = p.readInt();
            dataCall.type = p.readString();
            dataCall.ifname = p.readString();
            if (dataCall.status == DataConnection.FailCause.NONE.getErrorCode()
                && TextUtils.isEmpty(dataCall.ifname)
                && dataCall.active != 0) {
                throw new RuntimeException("getDataCallState, no ifname");
            }
            String addresses = p.readString();
            if (!TextUtils.isEmpty(addresses)) {
                dataCall.addresses = addresses.split(" ");
            }
            String dnses = p.readString();
            if (!TextUtils.isEmpty(dnses)) {
                dataCall.dnses = dnses.split(" ");
            }
            String gateways = p.readString();
            if (!TextUtils.isEmpty(gateways)) {
                dataCall.gateways = gateways.split(" ");
            }
        }

        return dataCall;
    }

    @Override
    protected Object
    responseIccCardStatus(Parcel p) {
+2 −1
Original line number Diff line number Diff line
@@ -257,7 +257,8 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
        dataCall.cid = 0; // Integer.parseInt(p.readString());
        p.readString();
        dataCall.ifname = p.readString();
        if (TextUtils.isEmpty(dataCall.ifname)) {
        if ((dataCall.status == DataConnection.FailCause.NONE.getErrorCode()) &&
             TextUtils.isEmpty(dataCall.ifname) && dataCall.active != 0) {
            throw new RuntimeException(
                    "RIL_REQUEST_SETUP_DATA_CALL response, no ifname");
        }