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

Commit 16330ce5 authored by Pawit Pornkitprasan's avatar Pawit Pornkitprasan Committed by Ricardo Cerqueira
Browse files

v3 RIL: Fix getDataCallState and PIN setting

Change-Id: Icf5cee33aeec58cffb23430f0f7b06b9971a71ad
parent 3f730cc1
Loading
Loading
Loading
Loading
+49 −16
Original line number Diff line number Diff line
@@ -697,8 +697,12 @@ public class RIL extends BaseCommands implements CommandsInterface {

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        rr.mp.writeInt(2);
        boolean oldRil = needsOldRilFeature("facilitylock");

        rr.mp.writeInt(oldRil ? 1 : 2);
        rr.mp.writeString(pin);

        if (!oldRil)
            rr.mp.writeString(aid);

        send(rr);
@@ -717,9 +721,13 @@ public class RIL extends BaseCommands implements CommandsInterface {

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        rr.mp.writeInt(3);
        boolean oldRil = needsOldRilFeature("facilitylock");

        rr.mp.writeInt(oldRil ? 2 : 3);
        rr.mp.writeString(puk);
        rr.mp.writeString(newPin);

        if (!oldRil)
            rr.mp.writeString(aid);

        send(rr);
@@ -738,8 +746,12 @@ public class RIL extends BaseCommands implements CommandsInterface {

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        rr.mp.writeInt(2);
        boolean oldRil = needsOldRilFeature("facilitylock");

        rr.mp.writeInt(oldRil ? 1 : 2);
        rr.mp.writeString(pin);

        if (!oldRil)
            rr.mp.writeString(aid);

        send(rr);
@@ -758,9 +770,13 @@ public class RIL extends BaseCommands implements CommandsInterface {

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        rr.mp.writeInt(3);
        boolean oldRil = needsOldRilFeature("facilitylock");

        rr.mp.writeInt(oldRil ? 2 : 3);
        rr.mp.writeString(puk);
        rr.mp.writeString(newPin2);

        if (!oldRil)
            rr.mp.writeString(aid);

        send(rr);
@@ -779,9 +795,13 @@ public class RIL extends BaseCommands implements CommandsInterface {

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        rr.mp.writeInt(3);
        boolean oldRil = needsOldRilFeature("facilitylock");

        rr.mp.writeInt(oldRil ? 2 : 3);
        rr.mp.writeString(oldPin);
        rr.mp.writeString(newPin);

        if (!oldRil)
            rr.mp.writeString(aid);

        send(rr);
@@ -800,9 +820,13 @@ public class RIL extends BaseCommands implements CommandsInterface {

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        rr.mp.writeInt(3);
        boolean oldRil = needsOldRilFeature("facilitylock");

        rr.mp.writeInt(oldRil ? 2 : 3);
        rr.mp.writeString(oldPin2);
        rr.mp.writeString(newPin2);

        if (!oldRil)
            rr.mp.writeString(aid);

        send(rr);
@@ -1659,13 +1683,17 @@ public class RIL extends BaseCommands implements CommandsInterface {

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        boolean oldRil = needsOldRilFeature("facilitylock");

        // count strings
        rr.mp.writeInt(4);
        rr.mp.writeInt(oldRil ? 3 : 4);

        rr.mp.writeString(facility);
        rr.mp.writeString(password);

        rr.mp.writeString(Integer.toString(serviceClass));

        if (!oldRil)
            rr.mp.writeString(appId);

        send(rr);
@@ -1688,14 +1716,18 @@ public class RIL extends BaseCommands implements CommandsInterface {

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        boolean oldRil = needsOldRilFeature("facilitylock");

        // count strings
        rr.mp.writeInt(5);
        rr.mp.writeInt(oldRil ? 4 : 5);

        rr.mp.writeString(facility);
        lockString = (lockState)?"1":"0";
        rr.mp.writeString(lockString);
        rr.mp.writeString(password);
        rr.mp.writeString(Integer.toString(serviceClass));

        if (!oldRil)
            rr.mp.writeString(appId);

        send(rr);
@@ -3125,6 +3157,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
            dataCall.cid = p.readInt();
            dataCall.active = p.readInt();
            dataCall.type = p.readString();
            p.readString(); // APN - not used
            String addresses = p.readString();
            if (!TextUtils.isEmpty(addresses)) {
                dataCall.addresses = addresses.split(" ");