summaryrefslogtreecommitdiffstats
path: root/libs/gui/SensorEventQueue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui/SensorEventQueue.cpp')
-rw-r--r--libs/gui/SensorEventQueue.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/gui/SensorEventQueue.cpp b/libs/gui/SensorEventQueue.cpp
index c365671..c2eaf4e 100644
--- a/libs/gui/SensorEventQueue.cpp
+++ b/libs/gui/SensorEventQueue.cpp
@@ -144,6 +144,15 @@ status_t SensorEventQueue::setEventRate(Sensor const* sensor, nsecs_t ns) const
return mSensorEventConnection->setEventRate(sensor->getHandle(), ns);
}
+void SensorEventQueue::sendAck(const ASensorEvent* events, int count) {
+ for (int i = 0; i < count; ++i) {
+ if (events[i].flags & WAKE_UP_SENSOR_EVENT_NEEDS_ACK) {
+ mSensorEventConnection->decreaseWakeLockRefCount();
+ }
+ }
+ return;
+}
+
// ----------------------------------------------------------------------------
}; // namespace android