Addition of HW Revision to Telephony Metrics
Test:
adb shell dumpsys activity service TelephonyDebugService --metrics
Hardware Version: EVT2.0
BUG:112541087
Change-Id: I57a3b21d66c0b8412c6d857bc5011db2f97d5cd2
(cherry picked from commit fd7548dfe50fc17fe660d983acb030ad712bba1a)
diff --git a/proto/src/telephony.proto b/proto/src/telephony.proto
index e441f71..c4c6a4f 100644
--- a/proto/src/telephony.proto
+++ b/proto/src/telephony.proto
@@ -47,6 +47,9 @@
// Modem power stats
optional ModemPowerStats modem_power_stats = 8;
+
+ // Hardware revision (EVT, DVT, PVT etc.)
+ optional string hardware_revision = 9;
}
// The time information
diff --git a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
index a436d25..a390b75 100644
--- a/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
+++ b/src/java/com/android/internal/telephony/metrics/TelephonyMetrics.java
@@ -38,6 +38,7 @@
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 @@
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 @@
// 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;