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

Commit efa8b9ae authored by jared caliendo's avatar jared caliendo Committed by Ricardo Cerqueira
Browse files

Introduce HTCCDMAQualcommRIL for HTC CDMA devices

This is based off HTCQualcommRIL with added changes from
SamsungQualcommRIL.

Adds responseDataRegistrationState from Chris Lawrence.

Change-Id: Id5b9c59b100229dd3abd356ecc5d4d94e93155d9
parent b28845b7
Loading
Loading
Loading
Loading
+686 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −31
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.Parcel;
import android.text.TextUtils;
import android.telephony.CellInfo;
import android.telephony.Rlog;

import com.android.internal.telephony.uicc.IccCardApplicationStatus;
@@ -47,37 +48,6 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
        super(context, networkMode, cdmaSubscription);
    }

    @Override
    protected Object
    responseIccCardStatus(Parcel p) {
        Object ret;

        boolean extraIccCardStates = needsOldRilFeature("extraicccardstates");

        if (extraIccCardStates) {
            int dataPosition = p.dataPosition();
            int cardState = p.readInt();

            if (cardState >= 3) {
                ret = responseVoid(p);
            } else {
                p.setDataPosition(dataPosition);
                ret = super.responseIccCardStatus(p);
            }
        } else {
            ret = super.responseIccCardStatus(p);
        }

        // force CDMA + LTE network mode
        boolean forceCdmaLte = needsOldRilFeature("forceCdmaLteNetworkType");

        if (forceCdmaLte) {
            setPreferredNetworkType(NETWORK_MODE_LTE_CDMA_EVDO, null);
        }

        return ret;
    }

    @Override
    protected void
    processUnsolicited (Parcel p) {
@@ -132,6 +102,7 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
                }
                setPreferredNetworkType(mPreferredNetworkType, null);
                setCdmaSubscriptionSource(mCdmaSubscription, null);
                setCellInfoListRate(Integer.MAX_VALUE, null);
                notifyRegistrantsRilConnectionChanged(((int[])ret)[0]);
                break;
            }