diff options
Diffstat (limited to 'healthd/BatteryMonitor.cpp')
-rw-r--r-- | healthd/BatteryMonitor.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp index b0e9a4d..c336c0a 100644 --- a/healthd/BatteryMonitor.cpp +++ b/healthd/BatteryMonitor.cpp @@ -231,9 +231,9 @@ bool BatteryMonitor::update(void) { path.clear(); path.appendFormat("%s/%s/type", POWER_SUPPLY_SYSFS_PATH, name); switch(readPowerSupplyType(path)) { - case ANDROID_POWER_SUPPLY_TYPE_AC: - case ANDROID_POWER_SUPPLY_TYPE_USB: - case ANDROID_POWER_SUPPLY_TYPE_WIRELESS: + case ANDROID_POWER_SUPPLY_TYPE_BATTERY: + break; + default: path.clear(); path.appendFormat("%s/%s/online", POWER_SUPPLY_SYSFS_PATH, name); if (access(path.string(), R_OK) == 0) { @@ -261,10 +261,6 @@ bool BatteryMonitor::update(void) { } } break; - case ANDROID_POWER_SUPPLY_TYPE_BATTERY: - break; - default: - break; } //switch } //while closedir(dir); |