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

Commit 27d8f466 authored by Jenny Ho's avatar Jenny Ho Committed by Android (Google) Code Review
Browse files

Merge "Assign 0 to buckets that do not exist"

parents c8b86c87 05a6e79f
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],