summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-10-14 02:55:55 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-10-14 02:55:55 +0000
commit7948a33f2c5a05d2f116f8b533db9f265b68f92f (patch)
treea0ab81834497799c7e7919dbe49ed1de85f71678 /healthd
parent4b9774fe9724c5c86b6951e465bc259b52cc213e (diff)
parentb2ab1c43cb3cae98ac42f3eac6c2ba2d33723a8c (diff)
downloadsystem_core-7948a33f2c5a05d2f116f8b533db9f265b68f92f.tar.gz
system_core-7948a33f2c5a05d2f116f8b533db9f265b68f92f.tar.bz2
system_core-7948a33f2c5a05d2f116f8b533db9f265b68f92f.zip
resolve merge conflicts of a4398c1 to stage-aosp-master am: 195669febc
am: b2ab1c43cb Change-Id: I412943235ad6cd908aca04c56aa19a3d2bbb5413
Diffstat (limited to 'healthd')
-rw-r--r--healthd/BatteryMonitor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/healthd/BatteryMonitor.cpp b/healthd/BatteryMonitor.cpp
index f81e7d9bf..0c90a5456 100644
--- a/healthd/BatteryMonitor.cpp
+++ b/healthd/BatteryMonitor.cpp
@@ -29,6 +29,7 @@
#include <memory>
#include <android-base/file.h>
+#include <android-base/parseint.h>
#include <android-base/strings.h>
#include <batteryservice/BatteryService.h>
#include <cutils/klog.h>
@@ -182,7 +183,7 @@ int BatteryMonitor::getIntField(const String8& path) {
int value = 0;
if (readFromFile(path, &buf) > 0)
- value = std::stoi(buf.c_str(), NULL, 0);
+ android::base::ParseInt(buf, &value);
return value;
}