From 441842e38e0f1d3ce50cbfe1d675f2709c330796 Mon Sep 17 00:00:00 2001 From: Brian Duddie Date: Tue, 18 Jun 2019 19:00:26 -0700 Subject: [PATCH] Notify HAL when events are read As defined in the HAL specification, the client of the HAL (framework or VTS) needs to set the EVENTS_READ flag when it fetches samples out of the FMQ, to support blocking write mode. Bug: 135442877 Test: run VTS on a device supporting HAL 2.0 Change-Id: Ic7755e869b999b638086275e4e579a84600be314 --- sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp b/sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp index 5f71654e97..0525bdc63b 100644 --- a/sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp +++ b/sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp @@ -139,6 +139,7 @@ void SensorsHidlEnvironmentV2_0::readEvents() { size_t eventsToRead = std::min(availableEvents, mEventBuffer.size()); if (eventsToRead > 0) { if (mEventQueue->read(mEventBuffer.data(), eventsToRead)) { + mEventQueueFlag->wake(asBaseType(EventQueueFlagBits::EVENTS_READ)); for (size_t i = 0; i < eventsToRead; i++) { addEvent(mEventBuffer[i]); }