propagate sensor event rate properly

Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc
This commit is contained in:
Mathias Agopian
2010-07-21 15:59:50 -07:00
parent 5df13ef30e
commit 23e8de26b7
4 changed files with 22 additions and 8 deletions

View File

@@ -114,8 +114,12 @@ status_t SensorEventQueue::disableSensor(Sensor const* sensor) const {
return mSensorEventConnection->enableDisable(sensor->getHandle(), false);
}
status_t SensorEventQueue::enableSensor(int32_t handle) const {
return mSensorEventConnection->enableDisable(handle, true);
status_t SensorEventQueue::enableSensor(int32_t handle, int32_t ms) const {
status_t err = mSensorEventConnection->enableDisable(handle, true);
if (err == NO_ERROR) {
mSensorEventConnection->setEventRate(handle, ms2ns(ms));
}
return err;
}
status_t SensorEventQueue::disableSensor(int32_t handle) const {