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

Commit 8260af8c authored by Richard Ross's avatar Richard Ross
Browse files

HTCQualcommRIL: responseIccCardStatus: add subscriptionFromSource feature.

Configure subscriptionFromSource quirk using needsOldRilFeature to ifdef tEh javaz for CDMA + LTE support.

Our RIL supports RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE and RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE.
These are used to determine desired subscription source on the fly.

Change-Id: Ife3b3413605e26efd8c1ba8af66cc0eea76072cb
parent 29d78052
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -51,6 +51,9 @@ public class HTCQualcommRIL extends QualcommSharedRIL implements CommandsInterfa
    responseIccCardStatus(Parcel p) {
        IccCardApplication ca;

        // use old needsOldRilFeature method for feature. it would be redundant to make
        // a new method just for naming sake.
        boolean subscriptionFromSource = needsOldRilFeature("subscriptionFromSource");
        boolean oldRil = needsOldRilFeature("icccardstatus");

        IccCardStatus status = new IccCardStatus();
@@ -91,12 +94,12 @@ public class HTCQualcommRIL extends QualcommSharedRIL implements CommandsInterfa
            status.addApplication(ca);
        }

        // use ril response to determine subscription source
        if (subscriptionFromSource)
            return status;

        int appIndex = -1;
        // NOTE: This works on Sprint LTE and CDMA devices with embedded SIM.
        // These devices require the subscription to be obtained from NV not the SIM or RUIM.
        // This may not be the case on a VZW device which has a proper SIM.
        if (mPhoneType == RILConstants.CDMA_PHONE ||
            getLteOnCdmaMode() == RILConstants.LTE_ON_CDMA_TRUE) {
        if (mPhoneType == RILConstants.CDMA_PHONE) {
            appIndex = status.getCdmaSubscriptionAppIndex();
            Log.d(LOG_TAG, "This is a CDMA PHONE " + appIndex);
        } else {