summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jenny Ho <hsiufangho@google.com> 2020-09-11 04:03:47 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-09-11 04:03:47 +0000
commit365bb8ebcc172b8b7cb09f237c36044cc4bbde9c (patch)
treed243785fb5d4a3ad627e8146edcf318f2a53eaed
parent2a680b7eef5ace561e4036121c9465270945f51f (diff)
parent1e28624f69b5f5ffdf026f4c05cf7ea1d27bd798 (diff)
Assign 0 to buckets that do not exist am: 1e28624f69
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/12548219 Change-Id: I4d2837be5bb5f26299c9bb0d0113771ed859ddc2
-rw-r--r--services/stats/StatsHal.cpp2
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],