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

Commit 4b785569 authored by Hashcode's avatar Hashcode
Browse files

ril: avoid sending null aid string in getIMSI

A change to how getIMSI works in JB causes null aid strings
to be sent.  The result for RILs older than v7 is a corrupt
ril response in SIMRecords::fetchSimRecords.  This corruption
ends up setting mImsi to null (in SIMRecords) and that causes
havoc w/ 3g/4g data connections.

This patch avoids sending null aid strings and has fixed
data connection issues on several Motorola devices.

Change-Id: Ic1fc363e35d79793c48d19080a2e028e428b888f
parent 88af7816
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -945,8 +945,10 @@ public class RIL extends BaseCommands implements CommandsInterface {
    getIMSIForApp(String aid, Message result) {
        RILRequest rr = RILRequest.obtain(RIL_REQUEST_GET_IMSI, result);

        if (aid != null || mRilVer >= 7) {
            rr.mp.writeInt(1);
            rr.mp.writeString(aid);
        }

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