Loading proto/src/telephony.proto +4 −2 Original line number Diff line number Diff line Loading @@ -262,9 +262,10 @@ message TelephonyServiceState { ROAMING_TYPE_INTERNATIONAL = 3; } // Frequency range enum FrequencyRange { // Unknown. The default value. FREQUENCY_RANGE_UNKNOWN = -1; FREQUENCY_RANGE_UNKNOWN = 0; // Frequency range is below 1GHz. FREQUENCY_RANGE_LOW = 1; Loading @@ -279,10 +280,11 @@ message TelephonyServiceState { FREQUENCY_RANGE_MMWAVE = 4; } // NR (5G) state enum NrState { // The device isn't camped on an LTE cell // or the LTE cell doesn't support EN-DC. NR_STATE_NONE = -1; NR_STATE_NONE = 0; // The device is camped on an LTE cell that supports EN-DC // but either DCNR is restricted Loading tests/telephonytests/src/com/android/internal/telephony/metrics/TelephonyMetricsTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.internal.telephony.metrics; import static android.telephony.NetworkRegistrationInfo.NR_STATE_NONE; import static android.telephony.ServiceState.FREQUENCY_RANGE_UNKNOWN; import static android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_LTE; import static android.telephony.ServiceState.ROAMING_TYPE_DOMESTIC; Loading Loading @@ -67,6 +69,8 @@ import com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.E import com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent; import com.android.internal.telephony.nano.TelephonyProto.TelephonyLog; import com.android.internal.telephony.nano.TelephonyProto.TelephonyServiceState; import com.android.internal.telephony.nano.TelephonyProto.TelephonyServiceState.FrequencyRange; import com.android.internal.telephony.nano.TelephonyProto.TelephonyServiceState.NrState; import com.android.internal.telephony.nano.TelephonyProto.TelephonyServiceState.RoamingType; import org.junit.After; Loading Loading @@ -116,6 +120,8 @@ public class TelephonyMetricsTest extends TelephonyTest { doReturn("123456").when(mServiceState).getDataOperatorNumeric(); doReturn(RIL_RADIO_TECHNOLOGY_LTE).when(mServiceState).getRilVoiceRadioTechnology(); doReturn(RIL_RADIO_TECHNOLOGY_LTE).when(mServiceState).getRilDataRadioTechnology(); doReturn(FREQUENCY_RANGE_UNKNOWN).when(mServiceState).getNrFrequencyRange(); doReturn(NR_STATE_NONE).when(mServiceState).getNrState(); } @After Loading Loading @@ -686,6 +692,10 @@ public class TelephonyMetricsTest extends TelephonyTest { assertEquals("datashort", state.dataOperator.alphaShort); assertEquals("123456", state.dataOperator.numeric); assertEquals(FrequencyRange.FREQUENCY_RANGE_UNKNOWN, state.nrFrequencyRange); assertEquals(NrState.NR_STATE_NONE, state.nrState); } // Test reset scenario Loading Loading
proto/src/telephony.proto +4 −2 Original line number Diff line number Diff line Loading @@ -262,9 +262,10 @@ message TelephonyServiceState { ROAMING_TYPE_INTERNATIONAL = 3; } // Frequency range enum FrequencyRange { // Unknown. The default value. FREQUENCY_RANGE_UNKNOWN = -1; FREQUENCY_RANGE_UNKNOWN = 0; // Frequency range is below 1GHz. FREQUENCY_RANGE_LOW = 1; Loading @@ -279,10 +280,11 @@ message TelephonyServiceState { FREQUENCY_RANGE_MMWAVE = 4; } // NR (5G) state enum NrState { // The device isn't camped on an LTE cell // or the LTE cell doesn't support EN-DC. NR_STATE_NONE = -1; NR_STATE_NONE = 0; // The device is camped on an LTE cell that supports EN-DC // but either DCNR is restricted Loading
tests/telephonytests/src/com/android/internal/telephony/metrics/TelephonyMetricsTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.internal.telephony.metrics; import static android.telephony.NetworkRegistrationInfo.NR_STATE_NONE; import static android.telephony.ServiceState.FREQUENCY_RANGE_UNKNOWN; import static android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_LTE; import static android.telephony.ServiceState.ROAMING_TYPE_DOMESTIC; Loading Loading @@ -67,6 +69,8 @@ import com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.E import com.android.internal.telephony.nano.TelephonyProto.TelephonyEvent; import com.android.internal.telephony.nano.TelephonyProto.TelephonyLog; import com.android.internal.telephony.nano.TelephonyProto.TelephonyServiceState; import com.android.internal.telephony.nano.TelephonyProto.TelephonyServiceState.FrequencyRange; import com.android.internal.telephony.nano.TelephonyProto.TelephonyServiceState.NrState; import com.android.internal.telephony.nano.TelephonyProto.TelephonyServiceState.RoamingType; import org.junit.After; Loading Loading @@ -116,6 +120,8 @@ public class TelephonyMetricsTest extends TelephonyTest { doReturn("123456").when(mServiceState).getDataOperatorNumeric(); doReturn(RIL_RADIO_TECHNOLOGY_LTE).when(mServiceState).getRilVoiceRadioTechnology(); doReturn(RIL_RADIO_TECHNOLOGY_LTE).when(mServiceState).getRilDataRadioTechnology(); doReturn(FREQUENCY_RANGE_UNKNOWN).when(mServiceState).getNrFrequencyRange(); doReturn(NR_STATE_NONE).when(mServiceState).getNrState(); } @After Loading Loading @@ -686,6 +692,10 @@ public class TelephonyMetricsTest extends TelephonyTest { assertEquals("datashort", state.dataOperator.alphaShort); assertEquals("123456", state.dataOperator.numeric); assertEquals(FrequencyRange.FREQUENCY_RANGE_UNKNOWN, state.nrFrequencyRange); assertEquals(NrState.NR_STATE_NONE, state.nrState); } // Test reset scenario Loading