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

Commit 097fd556 authored by Richard Ross's avatar Richard Ross Committed by kushdeck
Browse files

QualcommSharedRIL: Bypass CDMA subscription in handler switch to avoid...

QualcommSharedRIL:  Bypass CDMA subscription in handler switch to avoid crashing of telephony stack.

HTC EVO LTE gets subscription from both UICC and NV. The problem here is NV isn't ready
yet causing cdma subscription to return -1 and cause the stack to crash. fix is to bypass
CDMA subscription here and get UMTS subscription. Then get CDMA subscription later after NV is ready.

Use ro.telephony.ril.v3=skipCdmaSubcription to bypass CDMA subscription in this switch.

Change-Id: Ifff8816eca5b0ab8ed9682c8219642dc2fec09ce
parent a56c382e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ public class HTCQualcommRIL extends QualcommSharedRIL implements CommandsInterfa
            return status;

        int appIndex = -1;
        if (mPhoneType == RILConstants.CDMA_PHONE) {
        if (mPhoneType == RILConstants.CDMA_PHONE && !skipCdmaSubcription) {
            appIndex = status.getCdmaSubscriptionAppIndex();
            Log.d(LOG_TAG, "This is a CDMA PHONE " + appIndex);
        } else {
+3 −2
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
    protected String[] mLastDataIface = new String[20];
    boolean RILJ_LOGV = true;
    boolean RILJ_LOGD = true;
    boolean skipCdmaSubcription = needsOldRilFeature("skipCdmaSubcription");

    private final int RIL_INT_RADIO_OFF = 0;
    private final int RIL_INT_RADIO_UNAVALIABLE = 1;
@@ -185,7 +186,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
            status.addApplication(ca);
        }
        int appIndex = -1;
        if (mPhoneType == RILConstants.CDMA_PHONE) {
        if (mPhoneType == RILConstants.CDMA_PHONE && !skipCdmaSubcription) {
            appIndex = status.getCdmaSubscriptionAppIndex();
            Log.d(LOG_TAG, "This is a CDMA PHONE " + appIndex);
        } else {
@@ -705,7 +706,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                    } else {
                        int appIndex = -1;
                        if (mPhoneType == RILConstants.CDMA_PHONE) {
                        if (mPhoneType == RILConstants.CDMA_PHONE && !skipCdmaSubcription) {
                            appIndex = status.getCdmaSubscriptionAppIndex();
                            Log.d(LOG_TAG, "This is a CDMA PHONE " + appIndex);
                        } else {