fixup! healthd: Reinitialize mChargerNames for every battery update

Change-Id: I725578f0c445de8e177a1b02bd81a548ccde1493
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp
index 53ba6ca..799bbea 100644
--- a/healthd/BatteryMonitor.cpp
+++ b/healthd/BatteryMonitor.cpp
@@ -474,7 +474,7 @@
             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:
@@ -484,10 +484,10 @@
             // 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));
 
             }