Home | History | Annotate | Download | only in healthd

Lines Matching refs:props

64 static void initBatteryProperties(BatteryProperties* props) {
65 props->chargerAcOnline = false;
66 props->chargerUsbOnline = false;
67 props->chargerWirelessOnline = false;
68 props->maxChargingCurrent = 0;
69 props->maxChargingVoltage = 0;
70 props->batteryStatus = BATTERY_STATUS_UNKNOWN;
71 props->batteryHealth = BATTERY_HEALTH_UNKNOWN;
72 props->batteryPresent = false;
73 props->batteryLevel = 0;
74 props->batteryVoltage = 0;
75 props->batteryTemperature = 0;
76 props->batteryCurrent = 0;
77 props->batteryCycleCount = 0;
78 props->batteryFullCharge = 0;
79 props->batteryChargeCounter = 0;
80 props->batteryTechnology.clear();
88 initBatteryProperties(&props);
92 return batteryMonitor->props;
204 initBatteryProperties(&props);
207 props.batteryPresent = getBooleanField(mHealthdConfig->batteryPresentPath);
209 props.batteryPresent = mBatteryDevicePresent;
211 props.batteryLevel = mBatteryFixedCapacity ?
214 props.batteryVoltage = getIntField(mHealthdConfig->batteryVoltagePath) / 1000;
217 props.batteryCurrent = getIntField(mHealthdConfig->batteryCurrentNowPath) / 1000;
220 props.batteryFullCharge = getIntField(mHealthdConfig->batteryFullChargePath);
223 props.batteryCycleCount = getIntField(mHealthdConfig->batteryCycleCountPath);
226 props.batteryChargeCounter = getIntField(mHealthdConfig->batteryChargeCounterPath);
228 props.batteryTemperature = mBatteryFixedTemperature ?
235 props.batteryStatus = getBatteryStatus(buf.c_str());
238 props.batteryHealth = getBatteryHealth(buf.c_str());
241 props.batteryTechnology = String8(buf.c_str());
256 props.chargerAcOnline = true;
259 props.chargerUsbOnline = true;
262 props.chargerWirelessOnline = true;
285 props.maxChargingCurrent = ChargingCurrent;
286 props.maxChargingVoltage = ChargingVoltage;
292 logthis = !healthd_board_battery_update(&props);
297 if (props.batteryPresent) {
300 props.batteryLevel, props.batteryVoltage,
301 props.batteryTemperature < 0 ? "-" : "",
302 abs(props.batteryTemperature / 10),
303 abs(props.batteryTemperature % 10), props.batteryHealth,
304 props.batteryStatus);
309 " c=%d", props.batteryCurrent);
314 " fc=%d", props.batteryFullCharge);
319 " cc=%d", props.batteryCycleCount);
327 props.chargerAcOnline ? "a" : "",
328 props.chargerUsbOnline ? "u" : "",
329 props.chargerWirelessOnline ? "w" : "");
334 healthd_mode_ops->battery_update(&props);
335 return props.chargerAcOnline | props.chargerUsbOnline |
336 props.chargerWirelessOnline;
421 props.chargerAcOnline, props.chargerUsbOnline,
422 props.chargerWirelessOnline, props.maxChargingCurrent,
423 props.maxChargingVoltage);
426 props.batteryStatus, props.batteryHealth, props.batteryPresent);
429 props.batteryLevel, props.batteryVoltage,
430 props.batteryTemperature);
452 snprintf(vs, sizeof(vs), "current now: %d\n", props.batteryCurrent);
457 snprintf(vs, sizeof(vs), "cycle count: %d\n", props.batteryCycleCount);
462 snprintf(vs, sizeof(vs), "Full charge: %d\n", props.batteryFullCharge);