health: Move dumping function call into macro guards

Change-Id: I8d3bdd9e7e286b32090a62c474730b32141b9106
This commit is contained in:
Luofan Chen 2023-07-16 10:38:02 +08:00 committed by Fazil Sheik
parent dd3b4c21f8
commit 627824c134
1 changed files with 2 additions and 2 deletions

View File

@ -166,12 +166,12 @@ ndk::ScopedAStatus ChargingControl::getSupportedMode(int* _aidl_return) {
}
binder_status_t ChargingControl::dump(int fd, const char** /* args */, uint32_t /* numArgs */) {
bool isChargingEnabled;
int supportedMode;
getChargingEnabled(&isChargingEnabled);
getSupportedMode(&supportedMode);
#ifdef HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE
bool isChargingEnabled;
getChargingEnabled(&isChargingEnabled);
dprintf(fd, "Charging control node selected: %s\n", mChargingEnabledNode->path.c_str());
dprintf(fd, "Charging enabled: %s\n", isChargingEnabled ? "true" : "false");
#endif