diff options
| -rw-r--r-- | services/jni/com_android_server_BatteryService.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/jni/com_android_server_BatteryService.cpp b/services/jni/com_android_server_BatteryService.cpp index 485c289e68dd..433950d72f7a 100644 --- a/services/jni/com_android_server_BatteryService.cpp +++ b/services/jni/com_android_server_BatteryService.cpp @@ -144,7 +144,7 @@ static jint getBatteryHealth(const char* status) static int readFromFile(const String8& path, char* buf, size_t size) { - if (!path) + if (path.isEmpty()) return -1; int fd = open(path.string(), O_RDONLY, 0); if (fd == -1) { |