Merge "Sensor: Add batch support for native applications" into nyc-dev

This commit is contained in:
Peng Xu
2016-03-17 17:59:29 +00:00
committed by Android (Google) Code Review

View File

@@ -105,6 +105,14 @@ int ASensorManager_destroyEventQueue(ASensorManager* manager,
/*****************************************************************************/
int ASensorEventQueue_registerSensor(ASensorEventQueue* queue, ASensor const* sensor,
int32_t samplingPeriodUs, int maxBatchReportLatencyUs)
{
return static_cast<SensorEventQueue*>(queue)->enableSensor(
static_cast<Sensor const*>(sensor)->getHandle(), samplingPeriodUs,
maxBatchReportLatencyUs, 0);
}
int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor)
{
return static_cast<SensorEventQueue*>(queue)->enableSensor(