Lines Matching refs:Sensor
20 #include <sensor/SensorEventQueue.h>
234 int32_t sensor_handle = buffer[i].sensor;
236 ALOGD_IF(DEBUG_CONNECTIONS, "flush complete event sensor==%d ",
237 buffer[i].meta_data.sensor);
238 // Setting sensor_handle to the correct sensor to ensure the sensor events per
239 // connection are filtered correctly. buffer[i].sensor is zero for meta_data
241 sensor_handle = buffer[i].meta_data.sensor;
245 // Check if this connection has registered for this sensor. If not continue to the
253 // Check if there is a pending flush_complete event for this sensor on this connection.
257 ALOGD_IF(DEBUG_CONNECTIONS, "First flush event for sensor==%d ",
258 buffer[i].meta_data.sensor);
263 // If there is a pending flush complete event for this sensor on this connection,
280 // Regular sensor event, just copy it to the scratch buffer.
286 } while ((i<numEvents) && ((buffer[i].sensor == sensor_handle &&
289 buffer[i].meta_data.sensor == sensor_handle)));
439 flushCompleteEvent.meta_data.sensor = handle;
451 flushCompleteEvent.meta_data.sensor);
523 ssize_t index = mSensorInfo.indexOfKey(scratch[j].meta_data.sensor);
525 ALOGW("%s: sensor 0x%x is not found in connection",
526 __func__, scratch[j].meta_data.sensor);
623 mService->getSensorInterfaceFromHandle(sensor_event.sensor);
663 // send sensor data that is stored in mEventCache for this connection.
677 const Sensor& sensor = si->getSensor();
678 if (sensor.getFifoReservedEventCount() == sensor.getFifoMaxEventCount()) {
679 // Each sensor has a reserved fifo. Sum up the fifo sizes for all wake up sensors and
681 if (sensor.isWakeUpSensor()) {
682 fifoWakeUpSensors += sensor.getFifoReservedEventCount();
684 fifoNonWakeUpSensors += sensor.getFifoReservedEventCount();
688 if (sensor.isWakeUpSensor()) {
689 fifoWakeUpSensors = fifoWakeUpSensors > sensor.getFifoMaxEventCount() ?
690 fifoWakeUpSensors : sensor.getFifoMaxEventCount();
693 fifoNonWakeUpSensors = fifoNonWakeUpSensors > sensor.getFifoMaxEventCount() ?
694 fifoNonWakeUpSensors : sensor.getFifoMaxEventCount();