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

Commit 8d4da0fc authored by Naveen Kalla's avatar Naveen Kalla
Browse files

Add Channel number to the service state metrics

This will allow us to check if failures are happening on a
certain band on the device

Bug: 129186924
Test: Manually checked the dumpsys
Change-Id: Ia512733b940b671ad05052b5f9f04e416227d976
parent f01f6a6c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -279,6 +279,9 @@ message TelephonyServiceState {

  // Current data radio technology
  optional RadioAccessTechnology data_rat = 6 [default = UNKNOWN];

  // Current Channel Number
  optional int32 channel_number = 7;
}

// Radio access families
+11 −4
Original line number Diff line number Diff line
@@ -412,7 +412,10 @@ public class TelephonyMetrics {
            pw.print("T=");
            if (event.type == TelephonyEvent.Type.RIL_SERVICE_STATE_CHANGED) {
                pw.print(telephonyEventToString(event.type)
                        + "(" + event.serviceState.dataRat + ")");
                        + "(" + "Data RAT " + event.serviceState.dataRat
                        + " Voice RAT " + event.serviceState.voiceRat
                        + " Channel Number " + event.serviceState.channelNumber
                        + ")");
            } else {
                pw.print(telephonyEventToString(event.type));
            }
@@ -438,7 +441,10 @@ public class TelephonyMetrics {
                pw.print(" T=");
                if (event.type == TelephonyCallSession.Event.Type.RIL_SERVICE_STATE_CHANGED) {
                    pw.println(callSessionEventToString(event.type)
                            + "(" + event.serviceState.dataRat + ")");
                            + "(" + "Data RAT " + event.serviceState.dataRat
                            + " Voice RAT " + event.serviceState.voiceRat
                            + " Channel Number " + event.serviceState.channelNumber
                            + ")");
                } else if (event.type == TelephonyCallSession.Event.Type.RIL_CALL_LIST_CHANGED) {
                    pw.println(callSessionEventToString(event.type));
                    pw.increaseIndent();
@@ -882,6 +888,7 @@ public class TelephonyMetrics {

        ssProto.voiceRat = serviceState.getRilVoiceRadioTechnology();
        ssProto.dataRat = serviceState.getRilDataRadioTechnology();
        ssProto.channelNumber = serviceState.getChannelNumber();
        return ssProto;
    }