int sensor_listener_set_max_batch_latency(sensor_listener_h listener, unsigned int max_batch_latency)
{
+ int id;
+ int type;
+ unsigned int event_id;
+
_D("called sensor_set_max_batch_latency : listener[0x%x], max_batch_latency[%d]", listener, max_batch_latency);
if (!listener)
if (listener->magic != SENSOR_LISTENER_MAGIC)
return SENSOR_ERROR_INVALID_PARAMETER;
-#ifdef BATCH_SUPPORT
- int type;
- unsigned int event_id;
-
+ id = listener->id;
type = (int)listener->type;
event_id = type << SENSOR_SHIFT_TYPE | 0x1;
- if (!sensord_change_event_max_batch_latency(listener->id, event_id, max_batch_latency))
+ if (!sensord_change_event_max_batch_latency(id, event_id, max_batch_latency))
return SENSOR_ERROR_NOT_SUPPORTED;
_D("success sensor_set_max_batch_latency");
return SENSOR_ERROR_NONE;
-#else
- return SENSOR_ERROR_NOT_SUPPORTED;
-#endif /* BATCH_SUPPORT */
}
int sensor_listener_set_option(sensor_listener_h listener, sensor_option_e option)