Sensor batching. Changes to the native code.
Bug: 10109508
Change-Id: I7333f3aac76125a8226a4c99c901fb904588df04
diff --git a/services/sensorservice/SensorInterface.cpp b/services/sensorservice/SensorInterface.cpp
index b483b75..f1d1663 100644
--- a/services/sensorservice/SensorInterface.cpp
+++ b/services/sensorservice/SensorInterface.cpp
@@ -32,7 +32,7 @@
HardwareSensor::HardwareSensor(const sensor_t& sensor)
: mSensorDevice(SensorDevice::getInstance()),
- mSensor(&sensor)
+ mSensor(&sensor, mSensorDevice.getHalDeviceVersion())
{
ALOGI("%s", sensor.name);
}
@@ -50,6 +50,16 @@
return mSensorDevice.activate(ident, mSensor.getHandle(), enabled);
}
+status_t HardwareSensor::batch(void* ident, int handle, int flags,
+ int64_t samplingPeriodNs, int64_t maxBatchReportLatencyNs) {
+ return mSensorDevice.batch(ident, mSensor.getHandle(), flags, samplingPeriodNs,
+ maxBatchReportLatencyNs);
+}
+
+status_t HardwareSensor::flush(void* ident, int handle) {
+ return mSensorDevice.flush(ident, handle);
+}
+
status_t HardwareSensor::setDelay(void* ident, int handle, int64_t ns) {
return mSensorDevice.setDelay(ident, handle, ns);
}