healthd: preserve uA and uAh units for current_now and charge_counter
Change-Id: I20b3f47c541c4321b0593e504090ad6573b9cb01
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp
index 8492dce..8ff5357 100644
--- a/healthd/BatteryMonitor.cpp
+++ b/healthd/BatteryMonitor.cpp
@@ -190,10 +190,10 @@
props.batteryVoltage = getIntField(mBatteryVoltagePath) / 1000;
if (!mBatteryCurrentNowPath.isEmpty())
- props.batteryCurrentNow = getIntField(mBatteryCurrentNowPath) / 1000;
+ props.batteryCurrentNow = getIntField(mBatteryCurrentNowPath);
if (!mBatteryChargeCounterPath.isEmpty())
- props.batteryChargeCounter = getIntField(mBatteryChargeCounterPath) / 1000;
+ props.batteryChargeCounter = getIntField(mBatteryChargeCounterPath);
props.batteryTemperature = getIntField(mBatteryTemperaturePath);
@@ -255,7 +255,7 @@
if (!mBatteryCurrentNowPath.isEmpty()) {
char b[20];
- snprintf(b, sizeof(b), " c=%d", props.batteryCurrentNow);
+ snprintf(b, sizeof(b), " c=%d", props.batteryCurrentNow / 1000);
strlcat(dmesgline, b, sizeof(dmesgline));
}