summaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2012-07-14 19:40:13 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-07-14 19:40:13 +0700
commit9e9cbf2798ae64f48b25a5716bbdeb43e36e32cf (patch)
tree78decdc46aa76a0fd3cf00bbb371966571cf902e /libsensors
parent83f873cb99c5827c794c31b6e0003e12b05069e3 (diff)
downloaddevice_samsung_aries-common-9e9cbf2798ae64f48b25a5716bbdeb43e36e32cf.zip
device_samsung_aries-common-9e9cbf2798ae64f48b25a5716bbdeb43e36e32cf.tar.gz
device_samsung_aries-common-9e9cbf2798ae64f48b25a5716bbdeb43e36e32cf.tar.bz2
jellybean bring up
Change-Id: I19a95c3c8613a81d02f1146941fcb2f9ecc4efae
Diffstat (limited to 'libsensors')
-rw-r--r--libsensors/BoschYamaha.cpp48
-rw-r--r--libsensors/CompassSensor.cpp22
-rw-r--r--libsensors/GyroSensor.cpp2
-rw-r--r--libsensors/LightSensor.cpp2
-rw-r--r--libsensors/OrientationSensor.cpp22
-rw-r--r--libsensors/ProximitySensor.cpp2
-rw-r--r--libsensors/SensorBase.cpp4
-rw-r--r--libsensors/Smb380Sensor.cpp22
-rw-r--r--libsensors/sensors.cpp10
9 files changed, 67 insertions, 67 deletions
diff --git a/libsensors/BoschYamaha.cpp b/libsensors/BoschYamaha.cpp
index a6b9fa6..5836d19 100644
--- a/libsensors/BoschYamaha.cpp
+++ b/libsensors/BoschYamaha.cpp
@@ -139,15 +139,15 @@ int BoschYamaha::enable(int32_t handle, int en)
if(what == MagneticField){
what = Accelerometer; //Enable also Accel
//Compass
- LOGD("BoschYamaha::~enable Compass(0, %d)", en);
+ ALOGD("BoschYamaha::~enable Compass(0, %d)", en);
int flags = en ? 1 : 0;
if (flags != compassEnabled) {
int fd;
strcpy(&input_sysfs_path[input_sysfs_path_len], "enable");
- LOGD("BoschYamaha::~enable Compass(0, %d) open %s",en, input_sysfs_path);
+ ALOGD("BoschYamaha::~enable Compass(0, %d) open %s",en, input_sysfs_path);
fd = open(input_sysfs_path, O_RDWR);
if (fd >= 0) {
- LOGD("CompassSensor::~enable(0, %d) opened %s",en, input_sysfs_path);
+ ALOGD("CompassSensor::~enable(0, %d) opened %s",en, input_sysfs_path);
char buf[2];
int err;
buf[1] = 0;
@@ -168,15 +168,15 @@ int BoschYamaha::enable(int32_t handle, int en)
if(what == Accelerometer){
//Accelerometer
- LOGD("BoschYamaha::~enable Accel(0, %d)", en);
+ ALOGD("BoschYamaha::~enable Accel(0, %d)", en);
int flags = en ? 1 : 0;
if (flags != accelEnabled) {
int fd;
strcpy(&input_accel_sysfs_path[input_accel_sysfs_path_len], "enable");
- LOGD("BoschYamaha::~enable Accel(0, %d) open %s",en, input_accel_sysfs_path);
+ ALOGD("BoschYamaha::~enable Accel(0, %d) open %s",en, input_accel_sysfs_path);
fd = open(input_accel_sysfs_path, O_RDWR);
if (fd >= 0) {
- LOGD("CompassSensor::~enable(0, %d) opened %s",en, input_accel_sysfs_path);
+ ALOGD("CompassSensor::~enable(0, %d) opened %s",en, input_accel_sysfs_path);
char buf[2];
int err;
buf[1] = 0;
@@ -229,13 +229,13 @@ int BoschYamaha::update_delay()
bool BoschYamaha::hasPendingEvents() {
- //LOGD("hasPendingEvents was called");
+ //ALOGD("hasPendingEvents was called");
if(accelEnabled || compassEnabled){
- //LOGD("hasPendingEvents will return true");
+ //ALOGD("hasPendingEvents will return true");
return true;
}
else {
- //LOGD("hasPendingEvents will return false");
+ //ALOGD("hasPendingEvents will return false");
return false;
}
}
@@ -250,11 +250,11 @@ int BoschYamaha::readEvents(sensors_event_t* data, int count)
int numEventReceived = 0;
- //LOGD("Sensor: Read events was called with count: %d", count);
+ //ALOGD("Sensor: Read events was called with count: %d", count);
if(compassEnabled)
{
- //LOGD("Sensor: Compass is enabled, going to take care of it, count: %d", count);
+ //ALOGD("Sensor: Compass is enabled, going to take care of it, count: %d", count);
ssize_t n = mInputReaderMagnetic.fill(data_compass_fd);
if (n < 0)
return n;
@@ -277,7 +277,7 @@ int BoschYamaha::readEvents(sensors_event_t* data, int count)
else if (type == EV_SYN) {
mPendingEvents[MagneticField].timestamp = timevalToNano(event->time);
if (compassEnabled) {
- //LOGD("Sensor: Compass was enabled, made a read and received a Sync");
+ //ALOGD("Sensor: Compass was enabled, made a read and received a Sync");
compassDataReady = 1;
compassLastRead[0] = mPendingEvents[MagneticField].magnetic.x;
compassLastRead[1] = mPendingEvents[MagneticField].magnetic.y;
@@ -288,22 +288,22 @@ int BoschYamaha::readEvents(sensors_event_t* data, int count)
numEventReceived++;
}
} else {
- LOGE("BoschYamaha: unknown event (type=%d, code=%d)", type, event->code);
+ ALOGE("BoschYamaha: unknown event (type=%d, code=%d)", type, event->code);
}
mInputReaderMagnetic.next();
}
}
- //LOGD("Sensor: Compass read quited, count: %d", count);
+ //ALOGD("Sensor: Compass read quited, count: %d", count);
if(accelEnabled)
{
- //LOGD("Sensor: Accel is enabled, going to take care of it, count: %d", count);
+ //ALOGD("Sensor: Accel is enabled, going to take care of it, count: %d", count);
ssize_t n = mInputReaderAccel.fill(data_fd);
- //LOGD("Sensor: Accel Input Reader was filled up: %d", count);
+ //ALOGD("Sensor: Accel Input Reader was filled up: %d", count);
if (n < 0)
return n;
@@ -312,7 +312,7 @@ int BoschYamaha::readEvents(sensors_event_t* data, int count)
while (count && mInputReaderAccel.readEvent(&event)) {
int type = event->type;
if (type == EV_ABS) {
- //LOGD("Sensor: Received one EV_ABS Event");
+ //ALOGD("Sensor: Received one EV_ABS Event");
float value = event->value;
if (event->code == EVENT_TYPE_ACCEL_X) {
mPendingEvents[Accelerometer].acceleration.x = value * CONVERT_A_X;
@@ -324,7 +324,7 @@ int BoschYamaha::readEvents(sensors_event_t* data, int count)
} else if (type == EV_SYN) {
mPendingEvents[Accelerometer].timestamp = timevalToNano(event->time);
if (accelEnabled) {
- //LOGD("Sensor: Accel was enabled, made a read and received a Sync");
+ //ALOGD("Sensor: Accel was enabled, made a read and received a Sync");
accelDataReady = 1;
accelLastRead[0] = mPendingEvents[Accelerometer].acceleration.x;
accelLastRead[1] = mPendingEvents[Accelerometer].acceleration.y;
@@ -335,17 +335,17 @@ int BoschYamaha::readEvents(sensors_event_t* data, int count)
}
}
else {
- LOGE("BoschYamaha: unknown event (type=%d, code=%d)", type, event->code);
+ ALOGE("BoschYamaha: unknown event (type=%d, code=%d)", type, event->code);
}
mInputReaderAccel.next();
}
}
- //LOGD("Sensor: Accel read quited, count: %d, acceldata Ready: %d, compassData Ready = %d", count, accelDataReady, compassDataReady);
+ //ALOGD("Sensor: Accel read quited, count: %d, acceldata Ready: %d, compassData Ready = %d", count, accelDataReady, compassDataReady);
if( (accelDataReady == 1) && (compassDataReady == 1)){
- //LOGD("BoschYamaha: Going to Process Orientation Data");
+ //ALOGD("BoschYamaha: Going to Process Orientation Data");
accelDataReady = 0;
compassDataReady = 0;
processOrientation();
@@ -376,9 +376,9 @@ int BoschYamaha::processOrientation(){
get_euler(matrix, euler);
}
- //LOGD("BoschYamaha: azimuth is %d", (int)(euler[0]));
- //LOGD("BoschYamaha: pitch is %d", (int)(euler[1]));
- //LOGD("BoschYamaha: roll is %d", (int)(euler[2]));
+ //ALOGD("BoschYamaha: azimuth is %d", (int)(euler[0]));
+ //ALOGD("BoschYamaha: pitch is %d", (int)(euler[1]));
+ //ALOGD("BoschYamaha: roll is %d", (int)(euler[2]));
//Use CONVERT_O_A
mPendingEvents[Orientation].orientation.azimuth = (int)(euler[0]);
diff --git a/libsensors/CompassSensor.cpp b/libsensors/CompassSensor.cpp
index c98d068..6f63751 100644
--- a/libsensors/CompassSensor.cpp
+++ b/libsensors/CompassSensor.cpp
@@ -34,7 +34,7 @@ CompassSensor::CompassSensor()
mInputReader(4),
mHasPendingEvent(false)
{
- LOGD("CompassSensor::CompassSensor()");
+ ALOGD("CompassSensor::CompassSensor()");
mPendingEvent.version = sizeof(sensors_event_t);
mPendingEvent.sensor = ID_M;
mPendingEvent.type = SENSOR_TYPE_MAGNETIC_FIELD;
@@ -43,7 +43,7 @@ CompassSensor::CompassSensor()
memset(mPendingEvent.data, 0, sizeof(mPendingEvent.data));
- LOGD("CompassSensor::CompassSensor() open data_fd");
+ ALOGD("CompassSensor::CompassSensor() open data_fd");
if (data_fd) {
strcpy(input_sysfs_path, "/sys/class/input/");
@@ -57,7 +57,7 @@ CompassSensor::CompassSensor()
CompassSensor::~CompassSensor() {
- LOGD("CompassSensor::~CompassSensor()");
+ ALOGD("CompassSensor::~CompassSensor()");
if (mEnabled) {
enable(0, 0);
}
@@ -68,15 +68,15 @@ CompassSensor::~CompassSensor() {
int CompassSensor::enable(int32_t, int en) {
- LOGD("CompassSensor::~enable(0, %d)", en);
+ ALOGD("CompassSensor::~enable(0, %d)", en);
int flags = en ? 1 : 0;
if (flags != mEnabled) {
int fd;
strcpy(&input_sysfs_path[input_sysfs_path_len], "enable");
- LOGD("CompassSensor::~enable(0, %d) open %s",en, input_sysfs_path);
+ ALOGD("CompassSensor::~enable(0, %d) open %s",en, input_sysfs_path);
fd = open(input_sysfs_path, O_RDWR);
if (fd >= 0) {
- LOGD("CompassSensor::~enable(0, %d) opened %s",en, input_sysfs_path);
+ ALOGD("CompassSensor::~enable(0, %d) opened %s",en, input_sysfs_path);
char buf[2];
int err;
buf[1] = 0;
@@ -99,7 +99,7 @@ int CompassSensor::enable(int32_t, int en) {
bool CompassSensor::hasPendingEvents() const {
/* FIXME probably here should be returning mEnabled but instead
mHasPendingEvents. It does not work, so we cheat.*/
- //LOGD("CompassSensor::~hasPendingEvents %d", mHasPendingEvent ? 1 : 0 );
+ //ALOGD("CompassSensor::~hasPendingEvents %d", mHasPendingEvent ? 1 : 0 );
return mHasPendingEvent;
}
@@ -122,7 +122,7 @@ int CompassSensor::setDelay(int32_t handle, int64_t ns)
val = 1000;
}
- LOGD("CompassSensor::~setDelay(%d, %lld) val = %d", handle, ns, val);
+ ALOGD("CompassSensor::~setDelay(%d, %lld) val = %d", handle, ns, val);
strcpy(&input_sysfs_path[input_sysfs_path_len], "delay");
fd = open(input_sysfs_path, O_RDWR);
@@ -139,7 +139,7 @@ int CompassSensor::setDelay(int32_t handle, int64_t ns)
int CompassSensor::readEvents(sensors_event_t* data, int count)
{
- //LOGD("CompassSensor::~readEvents() %d", count);
+ //ALOGD("CompassSensor::~readEvents() %d", count);
if (count < 1)
return -EINVAL;
@@ -176,13 +176,13 @@ int CompassSensor::readEvents(sensors_event_t* data, int count)
numEventReceived++;
}
} else {
- LOGE("CompassSensor: unknown event (type=%d, code=%d)",
+ ALOGE("CompassSensor: unknown event (type=%d, code=%d)",
type, event->code);
}
mInputReader.next();
}
- //LOGD("CompassSensor::~readEvents() numEventReceived = %d", numEventReceived);
+ //ALOGD("CompassSensor::~readEvents() numEventReceived = %d", numEventReceived);
return numEventReceived++;
}
diff --git a/libsensors/GyroSensor.cpp b/libsensors/GyroSensor.cpp
index 7f6b864..03e5fce 100644
--- a/libsensors/GyroSensor.cpp
+++ b/libsensors/GyroSensor.cpp
@@ -160,7 +160,7 @@ again:
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/libsensors/LightSensor.cpp b/libsensors/LightSensor.cpp
index 5df7cd5..fe0b8b3 100644
--- a/libsensors/LightSensor.cpp
+++ b/libsensors/LightSensor.cpp
@@ -136,7 +136,7 @@ int LightSensor::readEvents(sensors_event_t* data, int count)
numEventReceived++;
}
} else {
- LOGE("LightSensor: unknown event (type=%d, code=%d)",
+ ALOGE("LightSensor: unknown event (type=%d, code=%d)",
type, event->code);
}
mInputReader.next();
diff --git a/libsensors/OrientationSensor.cpp b/libsensors/OrientationSensor.cpp
index d0c97af..e39edd7 100644
--- a/libsensors/OrientationSensor.cpp
+++ b/libsensors/OrientationSensor.cpp
@@ -35,13 +35,13 @@ OrientationSensor::OrientationSensor()
mInputReader(4),
mHasPendingEvent(false)
{
- LOGD("OrientationSensor::OrientationSensor()");
+ ALOGD("OrientationSensor::OrientationSensor()");
mPendingEvent.version = sizeof(sensors_event_t);
mPendingEvent.sensor = ID_O;
mPendingEvent.type = SENSOR_TYPE_ORIENTATION;
memset(mPendingEvent.data, 0, sizeof(mPendingEvent.data));
- LOGD("OrientationSensor::OrientationSensor() open data_fd");
+ ALOGD("OrientationSensor::OrientationSensor() open data_fd");
if (data_fd) {
strcpy(input_sysfs_path, "/sys/class/input/");
@@ -55,7 +55,7 @@ OrientationSensor::OrientationSensor()
OrientationSensor::~OrientationSensor() {
- LOGD("OrientationSensor::~OrientationSensor()");
+ ALOGD("OrientationSensor::~OrientationSensor()");
if (mEnabled) {
enable(0, 0);
}
@@ -65,15 +65,15 @@ OrientationSensor::~OrientationSensor() {
int OrientationSensor::enable(int32_t, int en) {
- LOGD("OrientationSensor::~enable(0, %d)", en);
+ ALOGD("OrientationSensor::~enable(0, %d)", en);
int flags = en ? 1 : 0;
if (flags != mEnabled) {
int fd;
strcpy(&input_sysfs_path[input_sysfs_path_len], "enable");
- LOGD("OrientationSensor::~enable(0, %d) open %s",en, input_sysfs_path);
+ ALOGD("OrientationSensor::~enable(0, %d) open %s",en, input_sysfs_path);
fd = open(input_sysfs_path, O_RDWR);
if (fd >= 0) {
- LOGD("OrientationSensor::~enable(0, %d) opened %s",en, input_sysfs_path);
+ ALOGD("OrientationSensor::~enable(0, %d) opened %s",en, input_sysfs_path);
char buf[2];
int err;
buf[1] = 0;
@@ -103,14 +103,14 @@ int OrientationSensor::enable(int32_t, int en) {
bool OrientationSensor::hasPendingEvents() const {
/* FIXME probably here should be returning mEnabled but instead
mHasPendingEvents. It does not work, so we cheat.*/
- //LOGD("OrientationSensor::~hasPendingEvents %d", mHasPendingEvent ? 1 : 0 );
+ //ALOGD("OrientationSensor::~hasPendingEvents %d", mHasPendingEvent ? 1 : 0 );
return mHasPendingEvent;
}
int OrientationSensor::setDelay(int32_t handle, int64_t ns)
{
- LOGD("OrientationSensor::~setDelay(%d, %lld)", handle, ns);
+ ALOGD("OrientationSensor::~setDelay(%d, %lld)", handle, ns);
int fd;
@@ -133,7 +133,7 @@ int OrientationSensor::setDelay(int32_t handle, int64_t ns)
int OrientationSensor::readEvents(sensors_event_t* data, int count)
{
- //LOGD("OrientationSensor::~readEvents() %d", count);
+ //ALOGD("OrientationSensor::~readEvents() %d", count);
if (count < 1)
return -EINVAL;
@@ -170,13 +170,13 @@ int OrientationSensor::readEvents(sensors_event_t* data, int count)
numEventReceived++;
}
} else {
- LOGE("OrientationSensor: unknown event (type=%d, code=%d)",
+ ALOGE("OrientationSensor: unknown event (type=%d, code=%d)",
type, event->code);
}
mInputReader.next();
}
- //LOGD("OrientationSensor::~readEvents() numEventReceived = %d", numEventReceived);
+ //ALOGD("OrientationSensor::~readEvents() numEventReceived = %d", numEventReceived);
return numEventReceived++;
}
diff --git a/libsensors/ProximitySensor.cpp b/libsensors/ProximitySensor.cpp
index 794a586..77a7f3c 100644
--- a/libsensors/ProximitySensor.cpp
+++ b/libsensors/ProximitySensor.cpp
@@ -129,7 +129,7 @@ int ProximitySensor::readEvents(sensors_event_t* data, int count)
numEventReceived++;
}
} else {
- LOGE("ProximitySensor: unknown event (type=%d, code=%d)",
+ ALOGE("ProximitySensor: unknown event (type=%d, code=%d)",
type, event->code);
}
mInputReader.next();
diff --git a/libsensors/SensorBase.cpp b/libsensors/SensorBase.cpp
index d448eb2..79b1ee2 100644
--- a/libsensors/SensorBase.cpp
+++ b/libsensors/SensorBase.cpp
@@ -53,7 +53,7 @@ SensorBase::~SensorBase() {
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;
}
@@ -123,6 +123,6 @@ int SensorBase::openInput(const char* inputName) {
}
}
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/libsensors/Smb380Sensor.cpp b/libsensors/Smb380Sensor.cpp
index e7565b1..e8aedee 100644
--- a/libsensors/Smb380Sensor.cpp
+++ b/libsensors/Smb380Sensor.cpp
@@ -35,13 +35,13 @@ Smb380Sensor::Smb380Sensor()
mInputReader(4),
mHasPendingEvent(false)
{
- LOGD("Smb380Sensor::Smb380Sensor()");
+ ALOGD("Smb380Sensor::Smb380Sensor()");
mPendingEvent.version = sizeof(sensors_event_t);
mPendingEvent.sensor = ID_A;
mPendingEvent.type = SENSOR_TYPE_ACCELEROMETER;
memset(mPendingEvent.data, 0, sizeof(mPendingEvent.data));
- LOGD("Smb380Sensor::Smb380Sensor() open data_fd");
+ ALOGD("Smb380Sensor::Smb380Sensor() open data_fd");
if (data_fd) {
strcpy(input_sysfs_path, "/sys/class/input/");
@@ -55,7 +55,7 @@ Smb380Sensor::Smb380Sensor()
Smb380Sensor::~Smb380Sensor() {
- LOGD("Smb380Sensor::~Smb380Sensor()");
+ ALOGD("Smb380Sensor::~Smb380Sensor()");
if (mEnabled) {
enable(0, 0);
}
@@ -66,15 +66,15 @@ Smb380Sensor::~Smb380Sensor() {
int Smb380Sensor::enable(int32_t, int en) {
- LOGD("Smb380Sensor::~enable(0, %d)", en);
+ ALOGD("Smb380Sensor::~enable(0, %d)", en);
int flags = en ? 1 : 0;
if (flags != mEnabled) {
int fd;
strcpy(&input_sysfs_path[input_sysfs_path_len], "enable");
- LOGD("Smb380Sensor::~enable(0, %d) open %s",en, input_sysfs_path);
+ ALOGD("Smb380Sensor::~enable(0, %d) open %s",en, input_sysfs_path);
fd = open(input_sysfs_path, O_RDWR);
if (fd >= 0) {
- LOGD("Smb380Sensor::~enable(0, %d) opened %s",en, input_sysfs_path);
+ ALOGD("Smb380Sensor::~enable(0, %d) opened %s",en, input_sysfs_path);
char buf[2];
int err;
buf[1] = 0;
@@ -98,14 +98,14 @@ int Smb380Sensor::enable(int32_t, int en) {
bool Smb380Sensor::hasPendingEvents() const {
/* FIXME probably here should be returning mEnabled but instead
mHasPendingEvents. It does not work, so we cheat.*/
- //LOGD("Smb380Sensor::~hasPendingEvents %d", mHasPendingEvent ? 1 : 0 );
+ //ALOGD("Smb380Sensor::~hasPendingEvents %d", mHasPendingEvent ? 1 : 0 );
return mHasPendingEvent;
}
int Smb380Sensor::setDelay(int32_t handle, int64_t ns)
{
- LOGD("Smb380Sensor::~setDelay(%d, %lld)", handle, ns);
+ ALOGD("Smb380Sensor::~setDelay(%d, %lld)", handle, ns);
int fd;
@@ -128,7 +128,7 @@ int Smb380Sensor::setDelay(int32_t handle, int64_t ns)
int Smb380Sensor::readEvents(sensors_event_t* data, int count)
{
- //LOGD("Smb380Sensor::~readEvents() %d", count);
+ //ALOGD("Smb380Sensor::~readEvents() %d", count);
if (count < 1)
return -EINVAL;
@@ -165,13 +165,13 @@ int Smb380Sensor::readEvents(sensors_event_t* data, int count)
numEventReceived++;
}
} else {
- LOGE("Smb380Sensor: unknown event (type=%d, code=%d)",
+ ALOGE("Smb380Sensor: unknown event (type=%d, code=%d)",
type, event->code);
}
mInputReader.next();
}
- //LOGD("Smb380Sensor::~readEvents() numEventReceived = %d", numEventReceived);
+ //ALOGD("Smb380Sensor::~readEvents() numEventReceived = %d", numEventReceived);
return numEventReceived++;
}
diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp
index 2459389..55bc6ea 100644
--- a/libsensors/sensors.cpp
+++ b/libsensors/sensors.cpp
@@ -204,7 +204,7 @@ sensors_poll_context_t::sensors_poll_context_t()
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];
@@ -263,7 +263,7 @@ int sensors_poll_context_t::real_activate(int handle, int enabled) {
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;
}
@@ -304,14 +304,14 @@ int sensors_poll_context_t::pollEvents(sensors_event_t* data, int count)
n = poll(mPollFds, numFds, nbEvents ? 0 : -1);
} while (n < 0 && errno == EINTR);
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;
}