Merge "Only save newly received events during testing"
This commit is contained in:
commit
a29f60d68a
1 changed files with 2 additions and 2 deletions
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue