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

Commit 80d3c539 authored by Sarah Chin's avatar Sarah Chin Committed by Gerrit Code Review
Browse files

Merge "Change defaults for FREQUENCY_RANGE and NR_STATE"

parents 93d68399 8ee106a6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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
+10 −0
Original line number Diff line number Diff line
@@ -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;

@@ -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;
@@ -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
@@ -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