Loading src/java/com/android/internal/telephony/ServiceStateTracker.java +3 −3 Original line number Diff line number Diff line Loading @@ -5226,7 +5226,7 @@ public class ServiceStateTracker extends Handler { if (currentServiceState.getVoiceRoaming()) { if (mPhone.isPhoneTypeGsm()) { // check roaming type by MCC if (inSameCountry(currentServiceState.getVoiceOperatorNumeric())) { if (inSameCountry(currentServiceState.getOperatorNumeric())) { currentServiceState.setVoiceRoamingType( ServiceState.ROAMING_TYPE_DOMESTIC); } else { Loading @@ -5250,7 +5250,7 @@ public class ServiceStateTracker extends Handler { } } else { // check roaming type by MCC if (inSameCountry(currentServiceState.getVoiceOperatorNumeric())) { if (inSameCountry(currentServiceState.getOperatorNumeric())) { currentServiceState.setVoiceRoamingType( ServiceState.ROAMING_TYPE_DOMESTIC); } else { Loading Loading @@ -5297,7 +5297,7 @@ public class ServiceStateTracker extends Handler { } } else { // take it as 3GPP roaming if (inSameCountry(currentServiceState.getDataOperatorNumeric())) { if (inSameCountry(currentServiceState.getOperatorNumeric())) { currentServiceState.setDataRoamingType(ServiceState.ROAMING_TYPE_DOMESTIC); } else { currentServiceState.setDataRoamingType( Loading src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java +9 −20 Original line number Diff line number Diff line Loading @@ -903,31 +903,20 @@ public class TelephonyMetrics { ssProto.dataRoamingType = serviceState.getDataRoamingType(); ssProto.voiceOperator = new TelephonyServiceState.TelephonyOperator(); if (serviceState.getVoiceOperatorAlphaLong() != null) { ssProto.voiceOperator.alphaLong = serviceState.getVoiceOperatorAlphaLong(); } if (serviceState.getVoiceOperatorAlphaShort() != null) { ssProto.voiceOperator.alphaShort = serviceState.getVoiceOperatorAlphaShort(); } if (serviceState.getVoiceOperatorNumeric() != null) { ssProto.voiceOperator.numeric = serviceState.getVoiceOperatorNumeric(); } ssProto.dataOperator = new TelephonyServiceState.TelephonyOperator(); if (serviceState.getDataOperatorAlphaLong() != null) { ssProto.dataOperator.alphaLong = serviceState.getDataOperatorAlphaLong(); if (serviceState.getOperatorAlphaLong() != null) { ssProto.voiceOperator.alphaLong = serviceState.getOperatorAlphaLong(); ssProto.dataOperator.alphaLong = serviceState.getOperatorAlphaLong(); } if (serviceState.getDataOperatorAlphaShort() != null) { ssProto.dataOperator.alphaShort = serviceState.getDataOperatorAlphaShort(); if (serviceState.getOperatorAlphaShort() != null) { ssProto.voiceOperator.alphaShort = serviceState.getOperatorAlphaShort(); ssProto.dataOperator.alphaShort = serviceState.getOperatorAlphaShort(); } if (serviceState.getDataOperatorNumeric() != null) { ssProto.dataOperator.numeric = serviceState.getDataOperatorNumeric(); if (serviceState.getOperatorNumeric() != null) { ssProto.voiceOperator.numeric = serviceState.getOperatorNumeric(); ssProto.dataOperator.numeric = serviceState.getOperatorNumeric(); } ssProto.voiceRat = serviceState.getRilVoiceRadioTechnology(); Loading tests/telephonytests/src/com/android/internal/telephony/ServiceStateTest.java +5 −11 Original line number Diff line number Diff line Loading @@ -200,19 +200,13 @@ public class ServiceStateTest extends TestCase { public void testOperatorName() { ServiceState ss = new ServiceState(); ss.setDataOperatorAlphaLong("abc"); assertEquals("abc", ss.getDataOperatorAlphaLong()); ss.setDataOperatorName("def", "xyz", "123456"); assertEquals("xyz", ss.getDataOperatorAlphaShort()); ss.setOperatorAlphaLong("abc"); assertEquals("abc", ss.getOperatorAlphaLong()); ss.setOperatorName("long", "short", "numeric"); assertEquals("long", ss.getVoiceOperatorAlphaLong()); assertEquals("short", ss.getVoiceOperatorAlphaShort()); assertEquals("numeric", ss.getVoiceOperatorNumeric()); assertEquals("long", ss.getDataOperatorAlphaLong()); assertEquals("short", ss.getDataOperatorAlphaShort()); assertEquals("numeric", ss.getDataOperatorNumeric()); assertEquals("long", ss.getOperatorAlphaLong()); assertEquals("short", ss.getOperatorAlphaShort()); assertEquals("numeric", ss.getOperatorNumeric()); assertEquals("long", ss.getOperatorAlpha()); ss.setOperatorName("", "short", ""); Loading tests/telephonytests/src/com/android/internal/telephony/metrics/TelephonyMetricsTest.java +11 −14 Original line number Diff line number Diff line Loading @@ -113,12 +113,9 @@ public class TelephonyMetricsTest extends TelephonyTest { doReturn(ROAMING_TYPE_DOMESTIC).when(mServiceState).getVoiceRoamingType(); doReturn(ROAMING_TYPE_DOMESTIC).when(mServiceState).getDataRoamingType(); doReturn("voiceshort").when(mServiceState).getVoiceOperatorAlphaShort(); doReturn("voicelong").when(mServiceState).getVoiceOperatorAlphaLong(); doReturn("datashort").when(mServiceState).getDataOperatorAlphaShort(); doReturn("datalong").when(mServiceState).getDataOperatorAlphaLong(); doReturn("123456").when(mServiceState).getVoiceOperatorNumeric(); doReturn("123456").when(mServiceState).getDataOperatorNumeric(); doReturn("short").when(mServiceState).getOperatorAlphaShort(); doReturn("long").when(mServiceState).getOperatorAlphaLong(); doReturn("123456").when(mServiceState).getOperatorNumeric(); doReturn(RIL_RADIO_TECHNOLOGY_LTE).when(mServiceState).getRilVoiceRadioTechnology(); doReturn(RIL_RADIO_TECHNOLOGY_LTE).when(mServiceState).getRilDataRadioTechnology(); doReturn(FREQUENCY_RANGE_UNKNOWN).when(mServiceState).getNrFrequencyRange(); Loading Loading @@ -708,15 +705,15 @@ public class TelephonyMetricsTest extends TelephonyTest { assertEquals(RoamingType.ROAMING_TYPE_DOMESTIC, state.dataRoamingType); assertEquals("voicelong", state.voiceOperator.alphaLong); assertEquals("long", state.voiceOperator.alphaLong); assertEquals("voiceshort", state.voiceOperator.alphaShort); assertEquals("short", state.voiceOperator.alphaShort); assertEquals("123456", state.voiceOperator.numeric); assertEquals("datalong", state.dataOperator.alphaLong); assertEquals("long", state.dataOperator.alphaLong); assertEquals("datashort", state.dataOperator.alphaShort); assertEquals("short", state.dataOperator.alphaShort); assertEquals("123456", state.dataOperator.numeric); Loading Loading @@ -756,15 +753,15 @@ public class TelephonyMetricsTest extends TelephonyTest { assertEquals(RoamingType.ROAMING_TYPE_DOMESTIC, state.dataRoamingType); assertEquals("voicelong", state.voiceOperator.alphaLong); assertEquals("long", state.voiceOperator.alphaLong); assertEquals("voiceshort", state.voiceOperator.alphaShort); assertEquals("short", state.voiceOperator.alphaShort); assertEquals("123456", state.voiceOperator.numeric); assertEquals("datalong", state.dataOperator.alphaLong); assertEquals("long", state.dataOperator.alphaLong); assertEquals("datashort", state.dataOperator.alphaShort); assertEquals("short", state.dataOperator.alphaShort); assertEquals("123456", state.dataOperator.numeric); } Loading Loading
src/java/com/android/internal/telephony/ServiceStateTracker.java +3 −3 Original line number Diff line number Diff line Loading @@ -5226,7 +5226,7 @@ public class ServiceStateTracker extends Handler { if (currentServiceState.getVoiceRoaming()) { if (mPhone.isPhoneTypeGsm()) { // check roaming type by MCC if (inSameCountry(currentServiceState.getVoiceOperatorNumeric())) { if (inSameCountry(currentServiceState.getOperatorNumeric())) { currentServiceState.setVoiceRoamingType( ServiceState.ROAMING_TYPE_DOMESTIC); } else { Loading @@ -5250,7 +5250,7 @@ public class ServiceStateTracker extends Handler { } } else { // check roaming type by MCC if (inSameCountry(currentServiceState.getVoiceOperatorNumeric())) { if (inSameCountry(currentServiceState.getOperatorNumeric())) { currentServiceState.setVoiceRoamingType( ServiceState.ROAMING_TYPE_DOMESTIC); } else { Loading Loading @@ -5297,7 +5297,7 @@ public class ServiceStateTracker extends Handler { } } else { // take it as 3GPP roaming if (inSameCountry(currentServiceState.getDataOperatorNumeric())) { if (inSameCountry(currentServiceState.getOperatorNumeric())) { currentServiceState.setDataRoamingType(ServiceState.ROAMING_TYPE_DOMESTIC); } else { currentServiceState.setDataRoamingType( Loading
src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java +9 −20 Original line number Diff line number Diff line Loading @@ -903,31 +903,20 @@ public class TelephonyMetrics { ssProto.dataRoamingType = serviceState.getDataRoamingType(); ssProto.voiceOperator = new TelephonyServiceState.TelephonyOperator(); if (serviceState.getVoiceOperatorAlphaLong() != null) { ssProto.voiceOperator.alphaLong = serviceState.getVoiceOperatorAlphaLong(); } if (serviceState.getVoiceOperatorAlphaShort() != null) { ssProto.voiceOperator.alphaShort = serviceState.getVoiceOperatorAlphaShort(); } if (serviceState.getVoiceOperatorNumeric() != null) { ssProto.voiceOperator.numeric = serviceState.getVoiceOperatorNumeric(); } ssProto.dataOperator = new TelephonyServiceState.TelephonyOperator(); if (serviceState.getDataOperatorAlphaLong() != null) { ssProto.dataOperator.alphaLong = serviceState.getDataOperatorAlphaLong(); if (serviceState.getOperatorAlphaLong() != null) { ssProto.voiceOperator.alphaLong = serviceState.getOperatorAlphaLong(); ssProto.dataOperator.alphaLong = serviceState.getOperatorAlphaLong(); } if (serviceState.getDataOperatorAlphaShort() != null) { ssProto.dataOperator.alphaShort = serviceState.getDataOperatorAlphaShort(); if (serviceState.getOperatorAlphaShort() != null) { ssProto.voiceOperator.alphaShort = serviceState.getOperatorAlphaShort(); ssProto.dataOperator.alphaShort = serviceState.getOperatorAlphaShort(); } if (serviceState.getDataOperatorNumeric() != null) { ssProto.dataOperator.numeric = serviceState.getDataOperatorNumeric(); if (serviceState.getOperatorNumeric() != null) { ssProto.voiceOperator.numeric = serviceState.getOperatorNumeric(); ssProto.dataOperator.numeric = serviceState.getOperatorNumeric(); } ssProto.voiceRat = serviceState.getRilVoiceRadioTechnology(); Loading
tests/telephonytests/src/com/android/internal/telephony/ServiceStateTest.java +5 −11 Original line number Diff line number Diff line Loading @@ -200,19 +200,13 @@ public class ServiceStateTest extends TestCase { public void testOperatorName() { ServiceState ss = new ServiceState(); ss.setDataOperatorAlphaLong("abc"); assertEquals("abc", ss.getDataOperatorAlphaLong()); ss.setDataOperatorName("def", "xyz", "123456"); assertEquals("xyz", ss.getDataOperatorAlphaShort()); ss.setOperatorAlphaLong("abc"); assertEquals("abc", ss.getOperatorAlphaLong()); ss.setOperatorName("long", "short", "numeric"); assertEquals("long", ss.getVoiceOperatorAlphaLong()); assertEquals("short", ss.getVoiceOperatorAlphaShort()); assertEquals("numeric", ss.getVoiceOperatorNumeric()); assertEquals("long", ss.getDataOperatorAlphaLong()); assertEquals("short", ss.getDataOperatorAlphaShort()); assertEquals("numeric", ss.getDataOperatorNumeric()); assertEquals("long", ss.getOperatorAlphaLong()); assertEquals("short", ss.getOperatorAlphaShort()); assertEquals("numeric", ss.getOperatorNumeric()); assertEquals("long", ss.getOperatorAlpha()); ss.setOperatorName("", "short", ""); Loading
tests/telephonytests/src/com/android/internal/telephony/metrics/TelephonyMetricsTest.java +11 −14 Original line number Diff line number Diff line Loading @@ -113,12 +113,9 @@ public class TelephonyMetricsTest extends TelephonyTest { doReturn(ROAMING_TYPE_DOMESTIC).when(mServiceState).getVoiceRoamingType(); doReturn(ROAMING_TYPE_DOMESTIC).when(mServiceState).getDataRoamingType(); doReturn("voiceshort").when(mServiceState).getVoiceOperatorAlphaShort(); doReturn("voicelong").when(mServiceState).getVoiceOperatorAlphaLong(); doReturn("datashort").when(mServiceState).getDataOperatorAlphaShort(); doReturn("datalong").when(mServiceState).getDataOperatorAlphaLong(); doReturn("123456").when(mServiceState).getVoiceOperatorNumeric(); doReturn("123456").when(mServiceState).getDataOperatorNumeric(); doReturn("short").when(mServiceState).getOperatorAlphaShort(); doReturn("long").when(mServiceState).getOperatorAlphaLong(); doReturn("123456").when(mServiceState).getOperatorNumeric(); doReturn(RIL_RADIO_TECHNOLOGY_LTE).when(mServiceState).getRilVoiceRadioTechnology(); doReturn(RIL_RADIO_TECHNOLOGY_LTE).when(mServiceState).getRilDataRadioTechnology(); doReturn(FREQUENCY_RANGE_UNKNOWN).when(mServiceState).getNrFrequencyRange(); Loading Loading @@ -708,15 +705,15 @@ public class TelephonyMetricsTest extends TelephonyTest { assertEquals(RoamingType.ROAMING_TYPE_DOMESTIC, state.dataRoamingType); assertEquals("voicelong", state.voiceOperator.alphaLong); assertEquals("long", state.voiceOperator.alphaLong); assertEquals("voiceshort", state.voiceOperator.alphaShort); assertEquals("short", state.voiceOperator.alphaShort); assertEquals("123456", state.voiceOperator.numeric); assertEquals("datalong", state.dataOperator.alphaLong); assertEquals("long", state.dataOperator.alphaLong); assertEquals("datashort", state.dataOperator.alphaShort); assertEquals("short", state.dataOperator.alphaShort); assertEquals("123456", state.dataOperator.numeric); Loading Loading @@ -756,15 +753,15 @@ public class TelephonyMetricsTest extends TelephonyTest { assertEquals(RoamingType.ROAMING_TYPE_DOMESTIC, state.dataRoamingType); assertEquals("voicelong", state.voiceOperator.alphaLong); assertEquals("long", state.voiceOperator.alphaLong); assertEquals("voiceshort", state.voiceOperator.alphaShort); assertEquals("short", state.voiceOperator.alphaShort); assertEquals("123456", state.voiceOperator.numeric); assertEquals("datalong", state.dataOperator.alphaLong); assertEquals("long", state.dataOperator.alphaLong); assertEquals("datashort", state.dataOperator.alphaShort); assertEquals("short", state.dataOperator.alphaShort); assertEquals("123456", state.dataOperator.numeric); } Loading