fixup! healthd: Reinitialize mChargerNames for every battery update
Change-Id: I725578f0c445de8e177a1b02bd81a548ccde1493
This commit is contained in:
parent
95f29b7678
commit
e5ae3b7888
1 changed files with 3 additions and 3 deletions
|
@ -471,7 +471,7 @@ void BatteryMonitor::updateValues(void) {
|
|||
case ANDROID_POWER_SUPPLY_TYPE_DOCK:
|
||||
path.clear();
|
||||
path.appendFormat("%s/%s/online", POWER_SUPPLY_SYSFS_PATH, name);
|
||||
if (access(path.string(), R_OK) == 0)
|
||||
if (access(path.c_str(), R_OK) == 0)
|
||||
mChargerNames.add(String8(name));
|
||||
break;
|
||||
default:
|
||||
|
@ -481,10 +481,10 @@ void BatteryMonitor::updateValues(void) {
|
|||
// Look for "is_dock" file
|
||||
path.clear();
|
||||
path.appendFormat("%s/%s/is_dock", POWER_SUPPLY_SYSFS_PATH, name);
|
||||
if (access(path.string(), R_OK) == 0) {
|
||||
if (access(path.c_str(), R_OK) == 0) {
|
||||
path.clear();
|
||||
path.appendFormat("%s/%s/online", POWER_SUPPLY_SYSFS_PATH, name);
|
||||
if (access(path.string(), R_OK) == 0)
|
||||
if (access(path.c_str(), R_OK) == 0)
|
||||
mChargerNames.add(String8(name));
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue