diff options
| author | 2020-09-08 13:06:22 +0800 | |
|---|---|---|
| committer | 2020-09-08 13:06:22 +0800 | |
| commit | 05a6e79f3f919e1e223445a98deb6160b064aae6 (patch) | |
| tree | 9927767d3260fbab7955d2ec4ca71d2a956eabf6 | |
| parent | df73ce542d19945b33cf49c67e00695340aeefdd (diff) | |
Assign 0 to buckets that do not exist
Bug: 166163010
Signed-off-by: Jenny Ho <hsiufangho@google.com>
Change-Id: Icec3984fe51dee411e8413cd6b44d67a88eaef9c
| -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], |