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

Commit c95ecb5e authored by Ying Wai (Daniel) Fan's avatar Ying Wai (Daniel) Fan Committed by android-build-merger
Browse files

Correct the formula of battery capacity estimation. am: c800ddc8

am: ac655b5a

Change-Id: Ifa298b57e62e4238740b177a7e4a346671d56987
parents 0574c9c9 ac655b5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -9614,7 +9614,7 @@ public class BatteryStatsImpl extends BatteryStats {
                resetAllStatsLocked();
                resetAllStatsLocked();
                if (chargeUAh > 0) {
                if (chargeUAh > 0) {
                    // Only use the reported coulomb charge value if it is supported and reported.
                    // 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;
                mDischargeStartLevel = level;
                reset = true;
                reset = true;