summaryrefslogtreecommitdiffstats
path: root/libsensors/OrientationSensor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsensors/OrientationSensor.cpp')
-rw-r--r--libsensors/OrientationSensor.cpp22
1 files changed, 11 insertions, 11 deletions
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++;
}