summaryrefslogtreecommitdiffstats
path: root/services/sensorservice/SensorInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/sensorservice/SensorInterface.cpp')
-rw-r--r--services/sensorservice/SensorInterface.cpp12
1 files changed, 11 insertions, 1 deletions
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 @@ SensorInterface::~SensorInterface()
HardwareSensor::HardwareSensor(const sensor_t& sensor)
: mSensorDevice(SensorDevice::getInstance()),
- mSensor(&sensor)
+ mSensor(&sensor, mSensorDevice.getHalDeviceVersion())
{
ALOGI("%s", sensor.name);
}
@@ -50,6 +50,16 @@ status_t HardwareSensor::activate(void* ident, bool enabled) {
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);
}