mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
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
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user