Add HW Revision to Telecom Metrics

Test:
adb shell dumpsys telecomm
Hardware Version: EVT2.0

BUG:112541087
Change-Id: I108b7b43d6fbd9899b4adba51720f0dd9ef3980b
diff --git a/proto/telecom.proto b/proto/telecom.proto
index 9fd64db..df69ed7 100644
--- a/proto/telecom.proto
+++ b/proto/telecom.proto
@@ -13,6 +13,9 @@
 
   // Timing information for the logging sessions
   repeated LogSessionTiming session_timings = 2;
+
+  // Hardware revision (EVT, DVT, PVT etc.)
+  optional string hardware_revision = 3;
 }
 
 message LogSessionTiming {
diff --git a/src/com/android/server/telecom/Analytics.java b/src/com/android/server/telecom/Analytics.java
index dbe1a29..1c9ac35 100644
--- a/src/com/android/server/telecom/Analytics.java
+++ b/src/com/android/server/telecom/Analytics.java
@@ -16,6 +16,8 @@
 
 package com.android.server.telecom;
 
+import android.os.SystemProperties;
+
 import android.telecom.Connection;
 import android.telecom.DisconnectCause;
 import android.telecom.Logging.EventManager;
@@ -583,6 +585,7 @@
                             .setSessionEntryPoint(timing.getKey())
                             .setTimeMillis(timing.getTime()))
                     .toArray(TelecomLogClass.LogSessionTiming[]::new);
+            result.setHardwareRevision(SystemProperties.get("ro.boot.revision", ""));
             if (args.length > 1 && CLEAR_ANALYTICS_ARG.equals(args[1])) {
                 sCallIdToInfo.clear();
                 sSessionTimings.clear();
@@ -628,6 +631,7 @@
                     .filter(e -> sSessionIdToLogSession.containsKey(e.getKey()))
                     .forEach(e -> writer.printf("%s: %.2f\n",
                             sSessionIdToLogSession.get(e.getKey()), e.getValue()));
+            writer.println("Hardware Version: " + SystemProperties.get("ro.boot.revision", ""));
         }
     }