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

Commit 9355686e authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Telephony: Make partial QCOM USIM support more widely available

The usage of special paths and network states for USIM cards isn't
limited to Huawei devices; it appears to be a common requirement
on recent CAF devices, so make it available under the "qcomuiccstack"
ril compatibility option

Change-Id: Idb1895061a4e05a6a6bb3df72336002bd53a3d4a
parent 058ad75a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -765,7 +765,7 @@ public abstract class IccCard {
            return IccCard.State.PUK_REQUIRED;
        }
        if (app.app_state.isSubscriptionPersoEnabled() &&
            (!(this.mPhone.mCM.getClass() == HuaweiRIL.class) ||
            (!(this.mPhone.mCM.needsOldRilFeature("qcomuiccstack")) ||
               app.perso_substate.isPersoSubStateNetworkLocked())) {
            return IccCard.State.NETWORK_LOCKED;
        }
+1 −1
Original line number Diff line number Diff line
@@ -610,7 +610,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
                            regState = Integer.parseInt(states[0]);

                            // states[3] (if present) is the current radio technology
                            if (states.length >= 4 && states[3] != null) {
                            if (states.length >= 4 && states[3] != null && !states[3].equals("")) {
                                type = Integer.parseInt(states[3]);
                            }
                            if ((states.length >= 5 ) && (regState == 3)) {
+1 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.internal.telephony.gsm;
import android.os.Message;
import android.util.Log;

import com.android.internal.telephony.HuaweiRIL;
import com.android.internal.telephony.IccCard;
import com.android.internal.telephony.IccCardApplication;
import com.android.internal.telephony.IccConstants;
@@ -58,7 +57,7 @@ public final class SIMFileHandler extends IccFileHandler implements IccConstants
    }

    protected String getEFPath(int efid) {
        if (phone.mCM.getClass() == HuaweiRIL.class) {
        if (phone.mCM.needsOldRilFeature("qcomuiccstack")) {
            IccCard icccard = phone.getIccCard();
            if (icccard != null && icccard.isApplicationOnIcc(IccCardApplication.AppType.APPTYPE_USIM))
                return getEFPathForUICC(efid);