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

Commit 896c7f89 authored by Ying Wai (Daniel) Fan's avatar Ying Wai (Daniel) Fan Committed by Android (Google) Code Review
Browse files

Merge "Correct the formula of battery capacity estimation."

parents 58ac1310 9238b612
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9713,7 +9713,7 @@ public class BatteryStatsImpl extends BatteryStats {
                resetAllStatsLocked();
                if (chargeUAh > 0) {
                    // Only use the reported coulomb charge value if it is supported and reported.
                    mEstimatedBatteryCapacity = (int) ((level / 100.0) * (chargeUAh / 1000));
                    mEstimatedBatteryCapacity = (int) ((chargeUAh / 1000) / (level / 100.0));
                }
                mDischargeStartLevel = level;
                reset = true;