Loading services/sensorservice/SensorService.cpp +4 −7 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include <gui/ISensorServer.h> #include <gui/ISensorEventConnection.h> #include <gui/SensorEventQueue.h> #include <hardware/sensors.h> Loading Loading @@ -587,10 +588,9 @@ status_t SensorService::SensorEventConnection::sendEvents( count = numEvents; } if (count == 0) return 0; ssize_t size = mChannel->write(scratch, count*sizeof(sensors_event_t)); // NOTE: ASensorEvent and sensors_event_t are the same type ssize_t size = SensorEventQueue::write(mChannel, reinterpret_cast<ASensorEvent const*>(scratch), count); if (size == -EAGAIN) { // the destination doesn't accept events anymore, it's probably // full. For now, we just drop the events on the floor. Loading @@ -598,9 +598,6 @@ status_t SensorService::SensorEventConnection::sendEvents( return size; } //ALOGE_IF(size<0, "dropping %d events on the floor (%s)", // count, strerror(-size)); return size < 0 ? status_t(size) : status_t(NO_ERROR); } Loading Loading
services/sensorservice/SensorService.cpp +4 −7 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include <gui/ISensorServer.h> #include <gui/ISensorEventConnection.h> #include <gui/SensorEventQueue.h> #include <hardware/sensors.h> Loading Loading @@ -587,10 +588,9 @@ status_t SensorService::SensorEventConnection::sendEvents( count = numEvents; } if (count == 0) return 0; ssize_t size = mChannel->write(scratch, count*sizeof(sensors_event_t)); // NOTE: ASensorEvent and sensors_event_t are the same type ssize_t size = SensorEventQueue::write(mChannel, reinterpret_cast<ASensorEvent const*>(scratch), count); if (size == -EAGAIN) { // the destination doesn't accept events anymore, it's probably // full. For now, we just drop the events on the floor. Loading @@ -598,9 +598,6 @@ status_t SensorService::SensorEventConnection::sendEvents( return size; } //ALOGE_IF(size<0, "dropping %d events on the floor (%s)", // count, strerror(-size)); return size < 0 ? status_t(size) : status_t(NO_ERROR); } Loading