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

Commit 888cc5d3 authored by Richard Ross's avatar Richard Ross
Browse files

HTCQualcommRIL: correct handling of CDMA + LTE quirk.

The current handling of this quirk just forces a specific
network mode. This breaksGSM mode and network selection on
boot for devices using this flag. To correct this, get the
value from Settings.Global object and set the default value
to CDMA + LTE mode for first boot.

Change-Id: I767d25e96b9cbbdddc486ce696eb95ff14dccb89
parent f3b29ddf
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -53,11 +53,13 @@ public class HTCQualcommRIL extends RIL implements CommandsInterface {
    @Override
    protected Object
    responseIccCardStatus(Parcel p) {
        // force CDMA + LTE network mode
        // get type from Settings.Global default to CDMA + LTE network mode
        boolean forceCdmaLte = needsOldRilFeature("forceCdmaLteNetworkType");

        if (forceCdmaLte) {
            setPreferredNetworkType(NETWORK_MODE_LTE_CDMA_EVDO, null);
            int phoneType = android.provider.Settings.Global.getInt(mContext.getContentResolver(),
                            android.provider.Settings.Global.PREFERRED_NETWORK_MODE,
                            NETWORK_MODE_LTE_CDMA_EVDO);
            setPreferredNetworkType(phoneType, null);
        }

        return super.responseIccCardStatus(p);