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

Commit 365bb8eb authored by Jenny Ho's avatar Jenny Ho Committed by Automerger Merge Worker
Browse files

Assign 0 to buckets that do not exist am: 1e28624f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/12548219

Change-Id: I4d2837be5bb5f26299c9bb0d0113771ed859ddc2
parents 2a680b7e 1e28624f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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],