Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220
Bug: 5449033
Change-Id: I68def002d684b093e919981261d0522a68343ec2
diff --git a/liblights/lights.c b/liblights/lights.c
index 534a980..3105024 100755
--- a/liblights/lights.c
+++ b/liblights/lights.c
@@ -62,7 +62,7 @@
return amt == -1 ? -errno : 0;
} else {
if (already_warned == -1) {
- LOGE("write_int failed to open %s\n", path);
+ ALOGE("write_int failed to open %s\n", path);
already_warned = 1;
}
return -errno;
@@ -82,7 +82,7 @@
return amt == -1 ? -errno : 0;
} else {
if (already_warned == -1) {
- LOGE("write_int failed to open %s\n", path);
+ ALOGE("write_int failed to open %s\n", path);
already_warned = 1;
}
return -errno;
@@ -175,7 +175,7 @@
}
}
if (new_state == 0) {
- LOGE("%s: unknown type (%d)\n", __func__, type);
+ ALOGE("%s: unknown type (%d)\n", __func__, type);
return;
}
diff --git a/sensors/AccelerationSensor.cpp b/sensors/AccelerationSensor.cpp
index 0d672f4..4505904 100644
--- a/sensors/AccelerationSensor.cpp
+++ b/sensors/AccelerationSensor.cpp
@@ -74,7 +74,7 @@
}
err = ioctl(dev_fd, KXTF9_IOCTL_SET_ENABLE, &flags);
err = err<0 ? -errno : 0;
- LOGE_IF(err, "KXTF9_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
+ ALOGE_IF(err, "KXTF9_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
if (!err) {
mEnabled = flags;
}
@@ -101,7 +101,7 @@
}
err = ioctl(dev_fd, KXTF9_IOCTL_SET_ENABLE, &flags);
err = err<0 ? -errno : 0;
- LOGE_IF(err, "KXTF9_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
+ ALOGE_IF(err, "KXTF9_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
if (!err) {
mOrientationEnabled = flags;
}
@@ -152,7 +152,7 @@
// accelerometer sends valid ABS events for
// userspace using EVIOCGABS
} else if (type != EV_ABS) {
- LOGE("AccelerationSensor: unknown event (type=%d, code=%d)",
+ ALOGE("AccelerationSensor: unknown event (type=%d, code=%d)",
type, event->code);
}
mInputReader.next();
diff --git a/sensors/AkmSensor.cpp b/sensors/AkmSensor.cpp
index 81145c2..60f288a 100644
--- a/sensors/AkmSensor.cpp
+++ b/sensors/AkmSensor.cpp
@@ -113,7 +113,7 @@
short flags = newState;
err = ioctl(dev_fd, cmd, &flags);
err = err<0 ? -errno : 0;
- LOGE_IF(err, "ECS_IOCTL_APP_SET_XXX failed (%s)", strerror(-err));
+ ALOGE_IF(err, "ECS_IOCTL_APP_SET_XXX failed (%s)", strerror(-err));
if (!err) {
mEnabled &= ~(1<<what);
mEnabled |= (uint32_t(flags)<<what);
@@ -201,7 +201,7 @@
mInputReader.next();
}
} else {
- LOGE("AkmSensor: unknown event (type=%d, code=%d)",
+ ALOGE("AkmSensor: unknown event (type=%d, code=%d)",
type, event->code);
mInputReader.next();
}
diff --git a/sensors/GyroSensor.cpp b/sensors/GyroSensor.cpp
index 71d629b..61d781d 100644
--- a/sensors/GyroSensor.cpp
+++ b/sensors/GyroSensor.cpp
@@ -69,7 +69,7 @@
}
err = ioctl(dev_fd, L3G4200D_IOCTL_SET_ENABLE, &flags);
err = err<0 ? -errno : 0;
- LOGE_IF(err, "L3G4200D_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
+ ALOGE_IF(err, "L3G4200D_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
if (!err) {
mEnabled = flags;
}
@@ -116,7 +116,7 @@
numEventReceived++;
}
} else {
- LOGE("GyroSensor: unknown event (type=%d, code=%d)",
+ ALOGE("GyroSensor: unknown event (type=%d, code=%d)",
type, event->code);
}
mInputReader.next();
diff --git a/sensors/LightSensor.cpp b/sensors/LightSensor.cpp
index 9667977..633baf4 100644
--- a/sensors/LightSensor.cpp
+++ b/sensors/LightSensor.cpp
@@ -54,7 +54,7 @@
}
err = ioctl(dev_fd, MAX9635_IOCTL_SET_ENABLE,&en);
err = err<0 ? -errno : 0;
- LOGE_IF(err, "MAX9635_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
+ ALOGE_IF(err, "MAX9635_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
if (!err) {
mEnabled = en;
}
@@ -105,7 +105,7 @@
if (type == 4 && event->code == 3) {
// weird, not sure why we're getting this all the time
} else {
- LOGE("LightSensor: unknown event (type=%d, code=%d)",
+ ALOGE("LightSensor: unknown event (type=%d, code=%d)",
type, event->code);
}
}
diff --git a/sensors/PressureSensor.cpp b/sensors/PressureSensor.cpp
index b6bb23c..49b3248 100644
--- a/sensors/PressureSensor.cpp
+++ b/sensors/PressureSensor.cpp
@@ -72,7 +72,7 @@
}
err = ioctl(dev_fd, BMP085_IOCTL_SET_ENABLE, &flags);
err = err<0 ? -errno : 0;
- LOGE_IF(err, "BMP085_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
+ ALOGE_IF(err, "BMP085_IOCTL_SET_ENABLE failed (%s)", strerror(-err));
if (!err) {
mEnabled = flags;
}
@@ -119,7 +119,7 @@
numEventReceived++;
}
} else {
- LOGE("PressureSensor: unknown event (type=%d, code=%d)",
+ ALOGE("PressureSensor: unknown event (type=%d, code=%d)",
type, event->code);
}
mInputReader.next();
diff --git a/sensors/SensorBase.cpp b/sensors/SensorBase.cpp
index e0554e4..0bd2ba7 100644
--- a/sensors/SensorBase.cpp
+++ b/sensors/SensorBase.cpp
@@ -51,7 +51,7 @@
int SensorBase::open_device() {
if (dev_fd<0 && dev_name) {
dev_fd = open(dev_name, O_RDONLY);
- LOGE_IF(dev_fd<0, "Couldn't open %s (%s)", dev_name, strerror(errno));
+ ALOGE_IF(dev_fd<0, "Couldn't open %s (%s)", dev_name, strerror(errno));
}
return 0;
}
@@ -117,6 +117,6 @@
}
}
closedir(dir);
- LOGE_IF(fd<0, "couldn't find '%s' input device", inputName);
+ ALOGE_IF(fd<0, "couldn't find '%s' input device", inputName);
return fd;
}
diff --git a/sensors/nusensors.cpp b/sensors/nusensors.cpp
index cd2136c..58cca08 100644
--- a/sensors/nusensors.cpp
+++ b/sensors/nusensors.cpp
@@ -112,7 +112,7 @@
int wakeFds[2];
int result = pipe(wakeFds);
- LOGE_IF(result<0, "error creating wake pipe (%s)", strerror(errno));
+ ALOGE_IF(result<0, "error creating wake pipe (%s)", strerror(errno));
fcntl(wakeFds[0], F_SETFL, O_NONBLOCK);
fcntl(wakeFds[1], F_SETFL, O_NONBLOCK);
mWritePipeFd = wakeFds[1];
@@ -141,7 +141,7 @@
if (enabled && !err) {
const char wakeMessage(WAKE_MESSAGE);
int result = write(mWritePipeFd, &wakeMessage, 1);
- LOGE_IF(result<0, "error sending wake message (%s)", strerror(errno));
+ ALOGE_IF(result<0, "error sending wake message (%s)", strerror(errno));
}
return err;
}
@@ -180,14 +180,14 @@
// anything to return
n = poll(mPollFds, numFds, nbEvents ? 0 : -1);
if (n<0) {
- LOGE("poll() failed (%s)", strerror(errno));
+ ALOGE("poll() failed (%s)", strerror(errno));
return -errno;
}
if (mPollFds[wake].revents & POLLIN) {
char msg;
int result = read(mPollFds[wake].fd, &msg, 1);
- LOGE_IF(result<0, "error reading from wake pipe (%s)", strerror(errno));
- LOGE_IF(msg != WAKE_MESSAGE, "unknown message on wake queue (0x%02x)", int(msg));
+ ALOGE_IF(result<0, "error reading from wake pipe (%s)", strerror(errno));
+ ALOGE_IF(msg != WAKE_MESSAGE, "unknown message on wake queue (0x%02x)", int(msg));
mPollFds[wake].revents = 0;
}
}
diff --git a/whisper/Whisper_AccyMain.c b/whisper/Whisper_AccyMain.c
index 9f79b0d..3e2ebe0 100644
--- a/whisper/Whisper_AccyMain.c
+++ b/whisper/Whisper_AccyMain.c
@@ -594,7 +594,7 @@
if(stat(LOG_FILE_PATH, &statBuf) == 0) {
logFp = fopen(LOG_FILE_NAME, "w");
if (logFp == NULL) {
- LOGE("whisperd: Unable to open the Logfile %s", LOG_FILE_NAME);
+ ALOGE("whisperd: Unable to open the Logfile %s", LOG_FILE_NAME);
}
}
#endif
diff --git a/whisper/Whisper_AccyMain.h b/whisper/Whisper_AccyMain.h
index b188484..db3ceff 100644
--- a/whisper/Whisper_AccyMain.h
+++ b/whisper/Whisper_AccyMain.h
@@ -45,7 +45,7 @@
#define DBG_ERROR(fmt,x...) \
do \
{ \
- LOGE(fmt" from %s() in %s(%d)\n",## x,__FUNCTION__,__FILE__,__LINE__); \
+ ALOGE(fmt" from %s() in %s(%d)\n",## x,__FUNCTION__,__FILE__,__LINE__); \
}while(0)
#elif defined(LOG_ACCY_FS)