Loading src/java/com/android/internal/telephony/CellularNetworkService.java +20 −2 Original line number Diff line number Diff line Loading @@ -276,7 +276,7 @@ public class CellularNetworkService extends NetworkService { return new NetworkRegistrationState(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */); false /* isNrAvailable */, false /* isEnDcAvailable */); } else if (result instanceof android.hardware.radio.V1_2.DataRegStateResult) { android.hardware.radio.V1_2.DataRegStateResult dataRegState = Loading @@ -293,7 +293,25 @@ public class CellularNetworkService extends NetworkService { return new NetworkRegistrationState(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */); false /* isNrAvailable */, false /* isEnDcAvailable */); } else if (result instanceof android.hardware.radio.V1_4.DataRegStateResult) { android.hardware.radio.V1_4.DataRegStateResult dataRegState = (android.hardware.radio.V1_4.DataRegStateResult) result; int regState = getRegStateFromHalRegState(dataRegState.base.regState); int accessNetworkTechnology = getAccessNetworkTechnologyFromRat(dataRegState.base.rat); int reasonForDenial = dataRegState.base.reasonDataDenied; boolean emergencyOnly = isEmergencyOnly(dataRegState.base.regState); int maxDataCalls = dataRegState.base.maxDataCalls; int[] availableServices = getAvailableServices(regState, domain, emergencyOnly); CellIdentity cellIdentity = convertHalCellIdentityToCellIdentity(dataRegState.base.cellIdentity); android.hardware.radio.V1_4.NrIndicators nrIndicators = dataRegState.nrIndicators; return new NetworkRegistrationState(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, nrIndicators.isDcNrRestricted, nrIndicators.isNrAvailable, nrIndicators.isEndcAvailable); } return null; } Loading tests/telephonytests/src/com/android/internal/telephony/CellularNetworkServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ public class CellularNetworkServiceTest extends TelephonyTest { expectedState = new NetworkRegistrationState( domain, AccessNetworkConstants.TransportType.WWAN, voiceRegState, ServiceState.rilRadioTechnologyToNetworkType(voiceRadioTech), reasonForDenial, false, availableServices, null, maxDataCalls, false, false); false, availableServices, null, maxDataCalls, false, false, false); try { verify(mCallback, times(1)).onGetNetworkRegistrationStateComplete( Loading tests/telephonytests/src/com/android/internal/telephony/ServiceStateTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -291,7 +291,7 @@ public class ServiceStateTest extends TestCase { NetworkRegistrationState wwanDataRegState = new NetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WWAN, 0, 0, 0, false, null, null, 0, false, false); 0, 0, 0, false, null, null, 0, false, false, false); NetworkRegistrationState wlanRegState = new NetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WLAN, Loading @@ -313,7 +313,7 @@ public class ServiceStateTest extends TestCase { wwanDataRegState = new NetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WWAN, 0, 0, 0, true, null, null, 0, false, false); 0, 0, 0, true, null, null, 0, false, false, false); ss.addNetworkRegistrationState(wwanDataRegState); assertEquals(ss.getNetworkRegistrationStates(NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WWAN), wwanDataRegState); Loading tests/telephonytests/src/com/android/internal/telephony/ServiceStateTrackerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -1673,7 +1673,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { private void changeRegState(int state, CellIdentity cid, int voiceRat, int dataRat) { NetworkRegistrationState dataResult = new NetworkRegistrationState( 0, 0, state, dataRat, 0, false, null, cid, 1, false, false); 0, 0, state, dataRat, 0, false, null, cid, 1, false, false, false); sst.mPollingContext[0] = 2; // update data reg state to be in service sst.sendMessage(sst.obtainMessage(ServiceStateTracker.EVENT_POLL_STATE_GPRS, Loading Loading @@ -1762,7 +1762,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { private void sendRegStateUpdateForLteCellId(CellIdentityLte cellId) { NetworkRegistrationState dataResult = new NetworkRegistrationState( 2, 1, 1, TelephonyManager.NETWORK_TYPE_LTE, 0, false, null, cellId, 1, false, false); false, false, false); NetworkRegistrationState voiceResult = new NetworkRegistrationState( 1, 1, 1, TelephonyManager.NETWORK_TYPE_LTE, 0, false, null, cellId, false, 0, 0, 0); Loading Loading @@ -1826,7 +1826,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { testPhyChanBandwidthRatchetedOnPhyChanBandwidth(); NetworkRegistrationState dataResult = new NetworkRegistrationState( 2, 1, 0, TelephonyManager.NETWORK_TYPE_UNKNOWN, 0, false, null, null, 1, false, false); false, false); NetworkRegistrationState voiceResult = new NetworkRegistrationState( 1, 1, 0, TelephonyManager.NETWORK_TYPE_UNKNOWN, 0, false, null, null, false, 0, 0, 0); Loading Loading
src/java/com/android/internal/telephony/CellularNetworkService.java +20 −2 Original line number Diff line number Diff line Loading @@ -276,7 +276,7 @@ public class CellularNetworkService extends NetworkService { return new NetworkRegistrationState(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */); false /* isNrAvailable */, false /* isEnDcAvailable */); } else if (result instanceof android.hardware.radio.V1_2.DataRegStateResult) { android.hardware.radio.V1_2.DataRegStateResult dataRegState = Loading @@ -293,7 +293,25 @@ public class CellularNetworkService extends NetworkService { return new NetworkRegistrationState(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */); false /* isNrAvailable */, false /* isEnDcAvailable */); } else if (result instanceof android.hardware.radio.V1_4.DataRegStateResult) { android.hardware.radio.V1_4.DataRegStateResult dataRegState = (android.hardware.radio.V1_4.DataRegStateResult) result; int regState = getRegStateFromHalRegState(dataRegState.base.regState); int accessNetworkTechnology = getAccessNetworkTechnologyFromRat(dataRegState.base.rat); int reasonForDenial = dataRegState.base.reasonDataDenied; boolean emergencyOnly = isEmergencyOnly(dataRegState.base.regState); int maxDataCalls = dataRegState.base.maxDataCalls; int[] availableServices = getAvailableServices(regState, domain, emergencyOnly); CellIdentity cellIdentity = convertHalCellIdentityToCellIdentity(dataRegState.base.cellIdentity); android.hardware.radio.V1_4.NrIndicators nrIndicators = dataRegState.nrIndicators; return new NetworkRegistrationState(domain, transportType, regState, accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, nrIndicators.isDcNrRestricted, nrIndicators.isNrAvailable, nrIndicators.isEndcAvailable); } return null; } Loading
tests/telephonytests/src/com/android/internal/telephony/CellularNetworkServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ public class CellularNetworkServiceTest extends TelephonyTest { expectedState = new NetworkRegistrationState( domain, AccessNetworkConstants.TransportType.WWAN, voiceRegState, ServiceState.rilRadioTechnologyToNetworkType(voiceRadioTech), reasonForDenial, false, availableServices, null, maxDataCalls, false, false); false, availableServices, null, maxDataCalls, false, false, false); try { verify(mCallback, times(1)).onGetNetworkRegistrationStateComplete( Loading
tests/telephonytests/src/com/android/internal/telephony/ServiceStateTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -291,7 +291,7 @@ public class ServiceStateTest extends TestCase { NetworkRegistrationState wwanDataRegState = new NetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WWAN, 0, 0, 0, false, null, null, 0, false, false); 0, 0, 0, false, null, null, 0, false, false, false); NetworkRegistrationState wlanRegState = new NetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WLAN, Loading @@ -313,7 +313,7 @@ public class ServiceStateTest extends TestCase { wwanDataRegState = new NetworkRegistrationState( NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WWAN, 0, 0, 0, true, null, null, 0, false, false); 0, 0, 0, true, null, null, 0, false, false, false); ss.addNetworkRegistrationState(wwanDataRegState); assertEquals(ss.getNetworkRegistrationStates(NetworkRegistrationState.DOMAIN_PS, AccessNetworkConstants.TransportType.WWAN), wwanDataRegState); Loading
tests/telephonytests/src/com/android/internal/telephony/ServiceStateTrackerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -1673,7 +1673,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { private void changeRegState(int state, CellIdentity cid, int voiceRat, int dataRat) { NetworkRegistrationState dataResult = new NetworkRegistrationState( 0, 0, state, dataRat, 0, false, null, cid, 1, false, false); 0, 0, state, dataRat, 0, false, null, cid, 1, false, false, false); sst.mPollingContext[0] = 2; // update data reg state to be in service sst.sendMessage(sst.obtainMessage(ServiceStateTracker.EVENT_POLL_STATE_GPRS, Loading Loading @@ -1762,7 +1762,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { private void sendRegStateUpdateForLteCellId(CellIdentityLte cellId) { NetworkRegistrationState dataResult = new NetworkRegistrationState( 2, 1, 1, TelephonyManager.NETWORK_TYPE_LTE, 0, false, null, cellId, 1, false, false); false, false, false); NetworkRegistrationState voiceResult = new NetworkRegistrationState( 1, 1, 1, TelephonyManager.NETWORK_TYPE_LTE, 0, false, null, cellId, false, 0, 0, 0); Loading Loading @@ -1826,7 +1826,7 @@ public class ServiceStateTrackerTest extends TelephonyTest { testPhyChanBandwidthRatchetedOnPhyChanBandwidth(); NetworkRegistrationState dataResult = new NetworkRegistrationState( 2, 1, 0, TelephonyManager.NETWORK_TYPE_UNKNOWN, 0, false, null, null, 1, false, false); false, false); NetworkRegistrationState voiceResult = new NetworkRegistrationState( 1, 1, 0, TelephonyManager.NETWORK_TYPE_UNKNOWN, 0, false, null, null, false, 0, 0, 0); Loading