Correct the formula of battery capacity estimation.

am: c800ddc824

Change-Id: Ia0a16cd15fc71f6ff2af89d7ecbb7a319b5ece92
This commit is contained in:
Ying Wai (Daniel) Fan
2017-01-31 20:53:26 +00:00
committed by android-build-merger

View File

@@ -9614,7 +9614,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;