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

Commit 23e48f39 authored by Siddharth Ray's avatar Siddharth Ray
Browse files

Add HW Revision to Telecom Metrics

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

BUG:112541087
Change-Id: I108b7b43d6fbd9899b4adba51720f0dd9ef3980b
parent d92a693e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,9 @@ message TelecomLog {

  // Timing information for the logging sessions
  repeated LogSessionTiming session_timings = 2;

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

message LogSessionTiming {
+4 −0
Original line number Diff line number Diff line
@@ -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 @@ public class Analytics {
                            .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 @@ public class Analytics {
                    .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", ""));
        }
    }