mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Only save newly received events during testing"
This commit is contained in:
committed by
Android (Google) Code Review
commit
a29f60d68a
@@ -123,8 +123,8 @@ void SensorsHidlEnvironmentV2_0::readEvents() {
|
||||
size_t eventsToRead = std::min(availableEvents, mEventBuffer.size());
|
||||
if (eventsToRead > 0) {
|
||||
if (mEventQueue->read(mEventBuffer.data(), eventsToRead)) {
|
||||
for (const auto& e : mEventBuffer) {
|
||||
addEvent(e);
|
||||
for (size_t i = 0; i < eventsToRead; i++) {
|
||||
addEvent(mEventBuffer[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user