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

Commit fd7548df authored by Siddharth Ray's avatar Siddharth Ray
Browse files

Addition of HW Revision to Telephony Metrics

Test:
adb shell dumpsys activity service TelephonyDebugService --metrics
Hardware Version: EVT2.0

BUG:112541087
Change-Id: I57a3b21d66c0b8412c6d857bc5011db2f97d5cd2
parent e363bb6b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ message TelephonyLog {

  // Modem power stats
  optional ModemPowerStats modem_power_stats = 8;

  // Hardware revision (EVT, DVT, PVT etc.)
  optional string hardware_revision = 9;
}

// The time information
+5 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import static com.android.internal.telephony.nano.TelephonyProto.PdpType.PDP_UNK
import android.hardware.radio.V1_0.SetupDataCallResult;
import android.os.Build;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.telephony.Rlog;
import android.telephony.ServiceState;
import android.telephony.TelephonyHistogram;
@@ -431,6 +432,7 @@ public class TelephonyMetrics {
        pw.println("Amount of time modem is in rx (ms): " + s.rxTimeMs);
        pw.println("Amount of time modem is in tx (ms): " + Arrays.toString(s.txTimeMs));
        pw.decreaseIndent();
        pw.println("Hardware Version: " + SystemProperties.get("ro.boot.revision", ""));
    }

    /**
@@ -527,6 +529,9 @@ public class TelephonyMetrics {
        // Build modem power metrics
        log.modemPowerStats = new ModemPowerMetrics().buildProto();

        // Log the hardware revision
        log.hardwareRevision = SystemProperties.get("ro.boot.revision", "");

        // Log the starting system time
        log.startTime = new TelephonyProto.Time();
        log.startTime.systemTimestampMillis = mStartSystemTimeMs;