summaryrefslogtreecommitdiffstats
path: root/sensors
diff options
context:
space:
mode:
authorBrian Stack <bstack@google.com>2018-11-09 10:15:15 -0800
committerBrian Stack <bstack@google.com>2018-11-09 10:29:03 -0800
commit4e152dd8bdbf252be6a533562c1b81dfc0130167 (patch)
treef432b92562a47b1ee0136f349e00a4f40237d029 /sensors
parent9c1867eec850558e04a772cd36f9ff744a2111b9 (diff)
downloadandroid_hardware_interfaces-4e152dd8bdbf252be6a533562c1b81dfc0130167.tar.gz
android_hardware_interfaces-4e152dd8bdbf252be6a533562c1b81dfc0130167.tar.bz2
android_hardware_interfaces-4e152dd8bdbf252be6a533562c1b81dfc0130167.zip
Add support for writeBlocking
Adds support for the Sensors HAL to use writeBlocking when sending sensor events to the framework. Bug: 111070257 Test: Builds, verified that if the default implementation is modified to use a writeBlocking call, the framework receives events, and the HAL blocks if the Event FMQ is full. Change-Id: I62fc654513afe98901b1e65bdf422af276d22663
Diffstat (limited to 'sensors')
-rw-r--r--sensors/2.0/types.hal10
1 files changed, 10 insertions, 0 deletions
diff --git a/sensors/2.0/types.hal b/sensors/2.0/types.hal
index e1a029a08..f9defa287 100644
--- a/sensors/2.0/types.hal
+++ b/sensors/2.0/types.hal
@@ -29,4 +29,14 @@ enum EventQueueFlagBits : uint32_t {
* Used to notify the Event FMQ that events should be read and processed.
*/
READ_AND_PROCESS = 1 << 0,
+
+ /**
+ * Used by the framework to signal to the HAL when events have been
+ * successfully read from the Event FMQ.
+ *
+ * If the MessageQueue::writeBlocking function is being used to write sensor
+ * events to the Event FMQ, then the readNotification parameter must be set
+ * to EVENTS_READ.
+ */
+ EVENTS_READ = 1 << 1,
};