DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master

Bug: 120502534
Change-Id: I540c4d84dbaa45e59f24edfe3fa96003b6315191
This commit is contained in:
Xin Li 2018-12-11 13:59:33 -08:00
commit 1ba1899aa2
2 changed files with 7 additions and 0 deletions

View File

@ -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 {

View File

@ -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;
@ -631,6 +633,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();
@ -676,6 +679,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", ""));
}
}