Loading src/java/com/android/internal/telephony/CellularNetworkService.java +4 −22 Original line number Diff line number Diff line Loading @@ -228,9 +228,6 @@ public class CellularNetworkService extends NetworkService { (android.hardware.radio.V1_0.VoiceRegStateResult) result; int regState = getRegStateFromHalRegState(voiceRegState.regState); int networkType = ServiceState.rilRadioTechnologyToNetworkType(voiceRegState.rat); if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) { networkType = TelephonyManager.NETWORK_TYPE_LTE; } int reasonForDenial = voiceRegState.reasonForDenial; boolean emergencyOnly = isEmergencyOnly(voiceRegState.regState); boolean cssSupported = voiceRegState.cssSupported; Loading @@ -251,9 +248,6 @@ public class CellularNetworkService extends NetworkService { (android.hardware.radio.V1_2.VoiceRegStateResult) result; int regState = getRegStateFromHalRegState(voiceRegState.regState); int networkType = ServiceState.rilRadioTechnologyToNetworkType(voiceRegState.rat); if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) { networkType = TelephonyManager.NETWORK_TYPE_LTE; } int reasonForDenial = voiceRegState.reasonForDenial; boolean emergencyOnly = isEmergencyOnly(voiceRegState.regState); boolean cssSupported = voiceRegState.cssSupported; Loading Loading @@ -281,7 +275,6 @@ public class CellularNetworkService extends NetworkService { int regState = NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN; int networkType = TelephonyManager.NETWORK_TYPE_UNKNOWN; int reasonForDenial = 0; boolean isUsingCarrierAggregation = false; boolean emergencyOnly = false; int maxDataCalls = 0; CellIdentity cellIdentity; Loading Loading @@ -355,15 +348,10 @@ public class CellularNetworkService extends NetworkService { List<Integer> availableServices = getAvailableServices( regState, domain, emergencyOnly); if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) { isUsingCarrierAggregation = true; networkType = TelephonyManager.NETWORK_TYPE_LTE; } return new NetworkRegistrationInfo(domain, transportType, regState, networkType, reasonForDenial, emergencyOnly, availableServices, cellIdentity, rplmn, maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable, lteVopsSupportInfo, isUsingCarrierAggregation); lteVopsSupportInfo); } private @NonNull NetworkRegistrationInfo getNetworkRegistrationInfo( Loading @@ -380,16 +368,10 @@ public class CellularNetworkService extends NetworkService { final String rplmn = regResult.registeredPlmn; final int reasonForDenial = regResult.reasonForDenial; // Network Type fixup for carrier aggregation int networkType = ServiceState.rilRadioTechnologyToNetworkType(regResult.rat); // 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) { // In Radio HAL v1.5, NETWORK_TYPE_LTE_CA is ignored. Callers should use // PhysicalChannelConfig. networkType = TelephonyManager.NETWORK_TYPE_LTE; } Loading Loading @@ -448,7 +430,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, false /* isUsingCarrierAggregation */); vopsInfo); } } Loading src/java/com/android/internal/telephony/RatRatcheter.java +2 −5 Original line number Diff line number Diff line Loading @@ -136,9 +136,6 @@ public class RatRatcheter { updateBandwidths(oldSS.getCellBandwidths(), newSS); boolean newUsingCA = oldSS.isUsingCarrierAggregation() || newSS.isUsingCarrierAggregation() || newSS.getCellBandwidths().length > 1; NetworkRegistrationInfo oldCsNri = oldSS.getNetworkRegistrationInfo( NetworkRegistrationInfo.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN); NetworkRegistrationInfo newCsNri = newSS.getNetworkRegistrationInfo( Loading @@ -148,6 +145,7 @@ public class RatRatcheter { newCsNri.getAccessNetworkTechnology()); newCsNri.setAccessNetworkTechnology(newPsNetworkType); newSS.addNetworkRegistrationInfo(newCsNri); if (oldCsNri.isUsingCarrierAggregation()) newCsNri.setIsUsingCarrierAggregation(true); } else if (oldCsNri.getAccessNetworkTechnology() != oldCsNri.getAccessNetworkTechnology()) { // resume rat ratchet on following rat change within the same location mVoiceRatchetEnabled = true; Loading @@ -162,12 +160,11 @@ public class RatRatcheter { newPsNri.getAccessNetworkTechnology()); newPsNri.setAccessNetworkTechnology(newPsNetworkType); newSS.addNetworkRegistrationInfo(newPsNri); if (oldPsNri.isUsingCarrierAggregation()) newPsNri.setIsUsingCarrierAggregation(true); } else if (oldPsNri.getAccessNetworkTechnology() != newPsNri.getAccessNetworkTechnology()) { // resume rat ratchet on following rat change within the same location mDataRatchetEnabled = true; } newSS.setIsUsingCarrierAggregation(newUsingCA); } private boolean isSameRatFamily(ServiceState ss1, ServiceState ss2) { Loading src/java/com/android/internal/telephony/ServiceStateTracker.java +2 −4 Original line number Diff line number Diff line Loading @@ -3250,10 +3250,8 @@ public class ServiceStateTracker extends Handler { int newRAT = newNrs != null ? newNrs.getAccessNetworkTechnology() : TelephonyManager.NETWORK_TYPE_UNKNOWN; boolean isOldCA = oldNrs != null ? (oldNrs.getDataSpecificInfo() != null ? oldNrs.getDataSpecificInfo().isUsingCarrierAggregation() : false) : false; boolean isNewCA = newNrs!= null ? (newNrs. getDataSpecificInfo() != null ? newNrs. getDataSpecificInfo().isUsingCarrierAggregation() : false) : false; boolean isOldCA = oldNrs != null ? oldNrs.isUsingCarrierAggregation() : false; boolean isNewCA = newNrs != null ? newNrs.isUsingCarrierAggregation() : false; // If the carrier enable KEY_SHOW_CARRIER_DATA_ICON_PATTERN_STRING and the operator name // match this pattern, the data rat display LteAdvanced indicator. Loading tests/telephonytests/src/com/android/internal/telephony/CellularNetworkServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ public class CellularNetworkServiceTest extends TelephonyTest { domain, AccessNetworkConstants.TRANSPORT_TYPE_WWAN, voiceRegState, ServiceState.rilRadioTechnologyToNetworkType(voiceRadioTech), reasonForDenial, false, availableServices, null, "", maxDataCalls, false, false, false, lteVopsSupportInfo, false); lteVopsSupportInfo); try { verify(mCallback, timeout(1000).times(1)).onRequestNetworkRegistrationInfoComplete( Loading tests/telephonytests/src/com/android/internal/telephony/RatRatcheterTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -104,8 +104,7 @@ public class RatRatcheterTest extends TelephonyTest { false, // isDcNrRestricted false, // isNrAvailable false, // isEndcAvailable lteVopsSupportInfo, // lteVopsSupportInfo isUsingCarrierAggregation); // isUsingCarrierAggregation lteVopsSupportInfo); // lteVopsSupportInfo } private void setNetworkRegistrationInfo(ServiceState ss, int accessNetworkTechnology) { Loading Loading
src/java/com/android/internal/telephony/CellularNetworkService.java +4 −22 Original line number Diff line number Diff line Loading @@ -228,9 +228,6 @@ public class CellularNetworkService extends NetworkService { (android.hardware.radio.V1_0.VoiceRegStateResult) result; int regState = getRegStateFromHalRegState(voiceRegState.regState); int networkType = ServiceState.rilRadioTechnologyToNetworkType(voiceRegState.rat); if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) { networkType = TelephonyManager.NETWORK_TYPE_LTE; } int reasonForDenial = voiceRegState.reasonForDenial; boolean emergencyOnly = isEmergencyOnly(voiceRegState.regState); boolean cssSupported = voiceRegState.cssSupported; Loading @@ -251,9 +248,6 @@ public class CellularNetworkService extends NetworkService { (android.hardware.radio.V1_2.VoiceRegStateResult) result; int regState = getRegStateFromHalRegState(voiceRegState.regState); int networkType = ServiceState.rilRadioTechnologyToNetworkType(voiceRegState.rat); if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) { networkType = TelephonyManager.NETWORK_TYPE_LTE; } int reasonForDenial = voiceRegState.reasonForDenial; boolean emergencyOnly = isEmergencyOnly(voiceRegState.regState); boolean cssSupported = voiceRegState.cssSupported; Loading Loading @@ -281,7 +275,6 @@ public class CellularNetworkService extends NetworkService { int regState = NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN; int networkType = TelephonyManager.NETWORK_TYPE_UNKNOWN; int reasonForDenial = 0; boolean isUsingCarrierAggregation = false; boolean emergencyOnly = false; int maxDataCalls = 0; CellIdentity cellIdentity; Loading Loading @@ -355,15 +348,10 @@ public class CellularNetworkService extends NetworkService { List<Integer> availableServices = getAvailableServices( regState, domain, emergencyOnly); if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) { isUsingCarrierAggregation = true; networkType = TelephonyManager.NETWORK_TYPE_LTE; } return new NetworkRegistrationInfo(domain, transportType, regState, networkType, reasonForDenial, emergencyOnly, availableServices, cellIdentity, rplmn, maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable, lteVopsSupportInfo, isUsingCarrierAggregation); lteVopsSupportInfo); } private @NonNull NetworkRegistrationInfo getNetworkRegistrationInfo( Loading @@ -380,16 +368,10 @@ public class CellularNetworkService extends NetworkService { final String rplmn = regResult.registeredPlmn; final int reasonForDenial = regResult.reasonForDenial; // Network Type fixup for carrier aggregation int networkType = ServiceState.rilRadioTechnologyToNetworkType(regResult.rat); // 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) { // In Radio HAL v1.5, NETWORK_TYPE_LTE_CA is ignored. Callers should use // PhysicalChannelConfig. networkType = TelephonyManager.NETWORK_TYPE_LTE; } Loading Loading @@ -448,7 +430,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, false /* isUsingCarrierAggregation */); vopsInfo); } } Loading
src/java/com/android/internal/telephony/RatRatcheter.java +2 −5 Original line number Diff line number Diff line Loading @@ -136,9 +136,6 @@ public class RatRatcheter { updateBandwidths(oldSS.getCellBandwidths(), newSS); boolean newUsingCA = oldSS.isUsingCarrierAggregation() || newSS.isUsingCarrierAggregation() || newSS.getCellBandwidths().length > 1; NetworkRegistrationInfo oldCsNri = oldSS.getNetworkRegistrationInfo( NetworkRegistrationInfo.DOMAIN_CS, AccessNetworkConstants.TRANSPORT_TYPE_WWAN); NetworkRegistrationInfo newCsNri = newSS.getNetworkRegistrationInfo( Loading @@ -148,6 +145,7 @@ public class RatRatcheter { newCsNri.getAccessNetworkTechnology()); newCsNri.setAccessNetworkTechnology(newPsNetworkType); newSS.addNetworkRegistrationInfo(newCsNri); if (oldCsNri.isUsingCarrierAggregation()) newCsNri.setIsUsingCarrierAggregation(true); } else if (oldCsNri.getAccessNetworkTechnology() != oldCsNri.getAccessNetworkTechnology()) { // resume rat ratchet on following rat change within the same location mVoiceRatchetEnabled = true; Loading @@ -162,12 +160,11 @@ public class RatRatcheter { newPsNri.getAccessNetworkTechnology()); newPsNri.setAccessNetworkTechnology(newPsNetworkType); newSS.addNetworkRegistrationInfo(newPsNri); if (oldPsNri.isUsingCarrierAggregation()) newPsNri.setIsUsingCarrierAggregation(true); } else if (oldPsNri.getAccessNetworkTechnology() != newPsNri.getAccessNetworkTechnology()) { // resume rat ratchet on following rat change within the same location mDataRatchetEnabled = true; } newSS.setIsUsingCarrierAggregation(newUsingCA); } private boolean isSameRatFamily(ServiceState ss1, ServiceState ss2) { Loading
src/java/com/android/internal/telephony/ServiceStateTracker.java +2 −4 Original line number Diff line number Diff line Loading @@ -3250,10 +3250,8 @@ public class ServiceStateTracker extends Handler { int newRAT = newNrs != null ? newNrs.getAccessNetworkTechnology() : TelephonyManager.NETWORK_TYPE_UNKNOWN; boolean isOldCA = oldNrs != null ? (oldNrs.getDataSpecificInfo() != null ? oldNrs.getDataSpecificInfo().isUsingCarrierAggregation() : false) : false; boolean isNewCA = newNrs!= null ? (newNrs. getDataSpecificInfo() != null ? newNrs. getDataSpecificInfo().isUsingCarrierAggregation() : false) : false; boolean isOldCA = oldNrs != null ? oldNrs.isUsingCarrierAggregation() : false; boolean isNewCA = newNrs != null ? newNrs.isUsingCarrierAggregation() : false; // If the carrier enable KEY_SHOW_CARRIER_DATA_ICON_PATTERN_STRING and the operator name // match this pattern, the data rat display LteAdvanced indicator. Loading
tests/telephonytests/src/com/android/internal/telephony/CellularNetworkServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ public class CellularNetworkServiceTest extends TelephonyTest { domain, AccessNetworkConstants.TRANSPORT_TYPE_WWAN, voiceRegState, ServiceState.rilRadioTechnologyToNetworkType(voiceRadioTech), reasonForDenial, false, availableServices, null, "", maxDataCalls, false, false, false, lteVopsSupportInfo, false); lteVopsSupportInfo); try { verify(mCallback, timeout(1000).times(1)).onRequestNetworkRegistrationInfoComplete( Loading
tests/telephonytests/src/com/android/internal/telephony/RatRatcheterTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -104,8 +104,7 @@ public class RatRatcheterTest extends TelephonyTest { false, // isDcNrRestricted false, // isNrAvailable false, // isEndcAvailable lteVopsSupportInfo, // lteVopsSupportInfo isUsingCarrierAggregation); // isUsingCarrierAggregation lteVopsSupportInfo); // lteVopsSupportInfo } private void setNetworkRegistrationInfo(ServiceState ss, int accessNetworkTechnology) { Loading