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

Commit e470d722 authored by Hashcode's avatar Hashcode Committed by Gerrit Code Review
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.

This new patch is implemented as an opt-in old ril feature

Change-Id: I6682ea10c8b216e2adc5abffbcc50f3cb6c9d7b8
parent 022224ee
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -945,8 +945,12 @@ public class RIL extends BaseCommands implements CommandsInterface {
    getIMSIForApp(String aid, Message result) {
        RILRequest rr = RILRequest.obtain(RIL_REQUEST_GET_IMSI, result);

        boolean oldRil = needsOldRilFeature("skipnullaid");

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

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