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

Commit 000f48b9 authored by Ajay Nambi's avatar Ajay Nambi Committed by Robert Greenwalt
Browse files

Add support for LTE CarrierAgregation

Note this may be redesigned in O to better handle the
various bitrate/channel combinations in a sane way.

bug:27360321
Change-Id: I29dc8cbbdec60b3a5c0eed8117e3b7bb27f429ed
parent b52b572d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2987,7 +2987,7 @@ public class GsmCdmaPhone extends Phone {
        logd("phoneObjectUpdater: newVoiceRadioTech=" + newVoiceRadioTech);

        // Check for a voice over lte replacement
        if ((newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_LTE)
        if (ServiceState.isLte(newVoiceRadioTech)
                || (newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)) {
            CarrierConfigManager configMgr = (CarrierConfigManager)
                    getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
+21 −25
Original line number Diff line number Diff line
@@ -1536,8 +1536,7 @@ public class ServiceStateTracker extends Handler {
                        mNewSS.setCdmaRoamingIndicator(mDefaultRoamingIndicator);
                    } else if (namMatch && !mIsInPrl) {
                        // TODO this will be removed when we handle roaming on LTE on CDMA+LTE phones
                        if (mNewSS.getRilVoiceRadioTechnology()
                                == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) {
                        if (ServiceState.isLte(mNewSS.getRilVoiceRadioTechnology())) {
                            log("Turn off roaming indicator as voice is LTE");
                            mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_OFF);
                        } else {
@@ -1848,20 +1847,17 @@ public class ServiceStateTracker extends Handler {
                        }
                    }

                    // If the unsolicited signal strength comes just before data RAT family changes (i.e.
                    // from UNKNOWN to LTE, CDMA to LTE, LTE to CDMA), the signal bar might display
                    // the wrong information until the next unsolicited signal strength information coming
                    // from the modem, which might take a long time to come or even not come at all.
                    // In order to provide the best user experience, we query the latest signal
                    // information so it will show up on the UI on time.

                    // If the unsolicited signal strength comes just before data RAT family changes
                    // (i.e. from UNKNOWN to LTE, CDMA to LTE, LTE to CDMA), the signal bar might
                    // display the wrong information until the next unsolicited signal strength
                    // information coming from the modem, which might take a long time to come or
                    // even not come at all.  In order to provide the best user experience, we
                    // query the latest signal information so it will show up on the UI on time.
                    int oldDataRAT = mSS.getRilDataRadioTechnology();
                    if ((oldDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN &&
                            newDataRAT != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) ||
                            (ServiceState.isCdma(oldDataRAT) &&
                                    newDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) ||
                            (oldDataRAT == ServiceState.RIL_RADIO_TECHNOLOGY_LTE &&
                                    ServiceState.isCdma(newDataRAT))) {
                            (ServiceState.isCdma(oldDataRAT) && ServiceState.isLte(newDataRAT)) ||
                            (ServiceState.isLte(oldDataRAT) && ServiceState.isCdma(newDataRAT))) {
                        mCi.getSignalStrength(obtainMessage(EVENT_GET_SIGNAL_STRENGTH));
                    }

@@ -3009,15 +3005,15 @@ public class ServiceStateTracker extends Handler {

        boolean has4gHandoff =
                mNewSS.getDataRegState() == ServiceState.STATE_IN_SERVICE &&
                        (((mSS.getRilDataRadioTechnology() == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) &&
                ((ServiceState.isLte(mSS.getRilDataRadioTechnology()) &&
                (mNewSS.getRilDataRadioTechnology() == ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD)) ||
                ((mSS.getRilDataRadioTechnology() == ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD) &&
                                        (mNewSS.getRilDataRadioTechnology() == ServiceState.RIL_RADIO_TECHNOLOGY_LTE)));
                ServiceState.isLte(mNewSS.getRilDataRadioTechnology())));

        boolean hasMultiApnSupport =
                (((mNewSS.getRilDataRadioTechnology() == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) ||
                ((ServiceState.isLte(mNewSS.getRilDataRadioTechnology()) ||
                (mNewSS.getRilDataRadioTechnology() == ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD)) &&
                        ((mSS.getRilDataRadioTechnology() != ServiceState.RIL_RADIO_TECHNOLOGY_LTE) &&
                (!ServiceState.isLte(mSS.getRilDataRadioTechnology()) &&
                (mSS.getRilDataRadioTechnology() != ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD)));

        boolean hasLostMultiApnSupport =
@@ -3087,7 +3083,7 @@ public class ServiceStateTracker extends Handler {
            boolean hasBrandOverride = mUiccController.getUiccCard(getPhoneId()) == null ? false :
                    (mUiccController.getUiccCard(getPhoneId()).getOperatorBrandOverride() != null);
            if (!hasBrandOverride && (mCi.getRadioState().isOn()) && (mPhone.isEriFileLoaded()) &&
                    (mSS.getRilVoiceRadioTechnology() != ServiceState.RIL_RADIO_TECHNOLOGY_LTE ||
                    (!ServiceState.isLte(mSS.getRilVoiceRadioTechnology()) ||
                            mPhone.getContext().getResources().getBoolean(com.android.internal.R.
                                    bool.config_LTE_eri_for_network_name))) {
                // Only when CDMA is in service, ERI will take effect
@@ -3113,7 +3109,7 @@ public class ServiceStateTracker extends Handler {

            if (mUiccApplcation != null && mUiccApplcation.getState() == AppState.APPSTATE_READY &&
                    mIccRecords != null && (mSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE)
                    && mSS.getRilVoiceRadioTechnology() != ServiceState.RIL_RADIO_TECHNOLOGY_LTE) {
                    && !ServiceState.isLte(mSS.getRilVoiceRadioTechnology())) {
                // SIM is found on the device. If ERI roaming is OFF, and SID/NID matches
                // one configured in SIM, use operator name from CSIM record. Note that ERI, SID,
                // and NID are CDMA only, not applicable to LTE.
@@ -4325,7 +4321,7 @@ public class ServiceStateTracker extends Handler {
        //override isGsm for CDMA LTE
        if (mPhone.isPhoneTypeGsm() ||
                (mPhone.isPhoneTypeCdmaLte() &&
                        mSS.getRilDataRadioTechnology() == ServiceState.RIL_RADIO_TECHNOLOGY_LTE)) {
                        ServiceState.isLte(mSS.getRilDataRadioTechnology()))) {
            isGsm = true;
        }

+1 −1
Original line number Diff line number Diff line
@@ -255,7 +255,7 @@ public class CdmaSMSDispatcher extends SMSDispatcher {

        int currentDataNetwork = mPhone.getServiceState().getDataNetworkType();
        boolean imsSmsDisabled = (currentDataNetwork == TelephonyManager.NETWORK_TYPE_EHRPD
                    || (currentDataNetwork == TelephonyManager.NETWORK_TYPE_LTE
                    || (ServiceState.isLte(currentDataNetwork)
                    && !mPhone.getServiceStateTracker().isConcurrentVoiceAndDataAllowed()))
                    && mPhone.getServiceState().getVoiceNetworkType()
                    == TelephonyManager.NETWORK_TYPE_1xRTT
+2 −0
Original line number Diff line number Diff line
@@ -813,6 +813,7 @@ public class DataConnection extends StateMachine {
                    sizes = TCP_BUFFER_SIZES_HSPA;
                    break;
                case ServiceState.RIL_RADIO_TECHNOLOGY_LTE:
                case ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA:
                    sizes = TCP_BUFFER_SIZES_LTE;
                    break;
                case ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP:
@@ -965,6 +966,7 @@ public class DataConnection extends StateMachine {
            case ServiceState.RIL_RADIO_TECHNOLOGY_HSPA: up = 5898; down = 14336; break;
            case ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_B: up = 1843; down = 5017; break;
            case ServiceState.RIL_RADIO_TECHNOLOGY_LTE: up = 51200; down = 102400; break;
            case ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA: up = 51200; down = 102400; break;
            case ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD: up = 153; down = 2516; break;
            case ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP: up = 11264; down = 43008; break;
            default: