summaryrefslogtreecommitdiffstats
path: root/healthd
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-10-14 02:47:32 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-10-14 02:47:32 +0000
commitb2ab1c43cb3cae98ac42f3eac6c2ba2d33723a8c (patch)
treec54bb205c3e1c1fe282bede091dfd71c3bc3ad82 /healthd
parent27c6c4cf045a6e8c0571979c22d653363fa8eec4 (diff)
parent195669febcdac6ca7a2ad35cab1e2ffbb2adb0c9 (diff)
downloadsystem_core-b2ab1c43cb3cae98ac42f3eac6c2ba2d33723a8c.tar.gz
system_core-b2ab1c43cb3cae98ac42f3eac6c2ba2d33723a8c.tar.bz2
system_core-b2ab1c43cb3cae98ac42f3eac6c2ba2d33723a8c.zip
resolve merge conflicts of a4398c1 to stage-aosp-master
am: 195669febc Change-Id: I112dd568460f41829fd9c01d41234bc409f5cbcf
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;
}