diff options
author | Jenny Ho <hsiufangho@google.com> | 2020-09-08 13:06:22 +0800 |
---|---|---|
committer | Jenny Ho <hsiufangho@google.com> | 2020-09-10 01:08:27 +0000 |
commit | 1e28624f69b5f5ffdf026f4c05cf7ea1d27bd798 (patch) | |
tree | c6ca419dd49ebee6f480013af9172c11c622e3e1 | |
parent | bbe9ff0ed9a1481985d1481ac3e19fa4fa5d9921 (diff) | |
download | native-1e28624f69b5f5ffdf026f4c05cf7ea1d27bd798.tar.gz |
Assign 0 to buckets that do not exist
Bug: 166163010
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: Icec3984fe51dee411e8413cd6b44d67a88eaef9c
(cherry picked from commit 05a6e79f3f919e1e223445a98deb6160b064aae6)
-rw-r--r-- | services/stats/StatsHal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/stats/StatsHal.cpp b/services/stats/StatsHal.cpp index 80c3b65ae8..ae0a9843f6 100644 --- a/services/stats/StatsHal.cpp +++ b/services/stats/StatsHal.cpp @@ -58,7 +58,7 @@ hardware::Return<void> StatsHal::reportChargeCycles(const ChargeCycles& chargeCy std::vector<int32_t> buckets = chargeCycles.cycleBucket; int initialSize = buckets.size(); for (int i = 0; i < 10 - initialSize; i++) { - buckets.push_back(-1); // Push -1 for buckets that do not exist. + buckets.push_back(0); // Push 0 for buckets that do not exist. } android::util::stats_write(android::util::CHARGE_CYCLES_REPORTED, buckets[0], buckets[1], buckets[2], buckets[3], buckets[4], buckets[5], buckets[6], buckets[7], buckets[8], |