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

Commit 0d5cb9a5 authored by Siddharth Ray's avatar Siddharth Ray Committed by android-build-merger
Browse files

Merge "Add HW Revision to GNSS Metrics" into pi-dev am: b0b70b8e

am: 66dcecd4

Change-Id: Ia350d430cda47cce23f5c3e81ee06dfa7261a51c
parents 309ff8a3 66dcecd4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.internal.location.gnssmetrics;

import android.os.SystemClock;
import android.os.connectivity.GpsBatteryStats;
import android.os.SystemProperties;

import android.text.format.DateUtils;
import android.util.Base64;
@@ -175,6 +176,7 @@ public class GnssMetrics {
          = topFourAverageCn0Statistics.getStandardDeviation();
    }
    msg.powerMetrics = mGnssPowerMetrics.buildProto();
    msg.hardwareRevision = SystemProperties.get("ro.boot.revision", "");
    String s = Base64.encodeToString(GnssLog.toByteArray(msg), Base64.DEFAULT);
    reset();
    return s;
@@ -239,6 +241,7 @@ public class GnssMetrics {
      s.append("  Energy consumed while on battery (mAh): ").append(
          stats.getEnergyConsumedMaMs() / ((double) DateUtils.HOUR_IN_MILLIS)).append("\n");
    }
    s.append("Hardware Version: " + SystemProperties.get("ro.boot.revision", "")).append("\n");
    return s.toString();
  }

+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@ message GnssLog {

  // Power metrics
  optional PowerMetrics power_metrics = 12;

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

// Power metrics