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

Commit 0832c689 authored by Nathan Harold's avatar Nathan Harold
Browse files

Fix LTE_CA bit to be enabled for < 1.5

Fix a mistake where LTE_CA support was accidentally
broken for devices that didn't support HAL 1.5 but
enabled for devices that do support 1.5. This is
backwards and unintentional.

The previous fix on this bug masked the visible symptoms
of this bug for all devices supporting HAL 1.2 or greater;
however, from the API, this was still wrong, and the bug
still visibly manifests on devices supporting HAL 1.1 or
1.0.

Bug: 154060784
Test: manual
Change-Id: If37bd0b7d6d02e373cd99c478fcd02e948d6d03b
parent 79d9be2b
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -355,14 +355,8 @@ public class CellularNetworkService extends NetworkService {
            List<Integer> availableServices = getAvailableServices(
                    regState, domain, emergencyOnly);

            // In earlier versions of the HAL, LTE_CA was allowed to indicate that the device
            // is on CA; however, that has been superseded by the PHYSICAL_CHANNEL_CONFIG signal.
            // Because some vendors provide both NETWORK_TYPE_LTE_CA *and* PHYSICAL_CHANNEL_CONFIG,
            // this tweak is left for compatibility; however, the network type is no longer allowed
            // to be used to declare that carrier aggregation is in effect, because the other
            // signal provides a much richer information set, and we want to mitigate confusion in
            // how CA information is being provided.
            if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
                isUsingCarrierAggregation = true;
                networkType = TelephonyManager.NETWORK_TYPE_LTE;
            }

@@ -388,9 +382,14 @@ public class CellularNetworkService extends NetworkService {

            // Network Type fixup for carrier aggregation
            int networkType = ServiceState.rilRadioTechnologyToNetworkType(regResult.rat);
            boolean isUsingCarrierAggregation = false;
            // In earlier versions of the HAL, LTE_CA was allowed to indicate that the device
            // is on CA; however, that has been superseded by the PHYSICAL_CHANNEL_CONFIG signal.
            // Because some vendors provide both NETWORK_TYPE_LTE_CA *and* PHYSICAL_CHANNEL_CONFIG,
            // this tweak is left for compatibility; however, the network type is no longer allowed
            // to be used to declare that carrier aggregation is in effect, because the other
            // signal provides a much richer information set, and we want to mitigate confusion in
            // how CA information is being provided.
            if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
                isUsingCarrierAggregation = true;
                networkType = TelephonyManager.NETWORK_TYPE_LTE;
            }

@@ -449,7 +448,7 @@ public class CellularNetworkService extends NetworkService {
                    return new NetworkRegistrationInfo(domain, transportType, regState, networkType,
                            reasonForDenial, isEmergencyOnly, availableServices, cellIdentity,
                            rplmn, MAX_DATA_CALLS, isDcNrRestricted, isNrAvailable, isEndcAvailable,
                            vopsInfo, isUsingCarrierAggregation);
                            vopsInfo, false /* isUsingCarrierAggregation */);
            }
        }