Merge "Fix logspam when battery sysfs file not available." into jb-mr2-dev

This commit is contained in:
Jeff Brown
2013-06-12 23:59:01 +00:00
committed by Android (Google) Code Review

View File

@@ -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) {