Consume batches in dispatcher tests
We are currently calling consume with consumeBatches=false. But that
means we don't want to consume any batched events. As a result, when
events are simply stored internally in inputconsumer, they are not
returned to callers of consume(..).
We never had tests that included MOVE events, and since DOWN events are
never batched, we did not encounter this case.
Now that we are adding a MOVE test, we need to ensure batches are
consumed as well.
Bug: none
Test: atest inputflinger_tests
Change-Id: Ieb13e1bb43bbf96f7f9352a283387ffdb11ba54a
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp
index 200e1f3..d53a557 100644
--- a/libs/input/InputTransport.cpp
+++ b/libs/input/InputTransport.cpp
@@ -301,8 +301,8 @@
if (nWrite < 0) {
int error = errno;
#if DEBUG_CHANNEL_MESSAGES
- ALOGD("channel '%s' ~ error sending message of type %d, errno=%d", mName.c_str(),
- msg->header.type, error);
+ ALOGD("channel '%s' ~ error sending message of type %d, %s", mName.c_str(),
+ msg->header.type, strerror(error));
#endif
if (error == EAGAIN || error == EWOULDBLOCK) {
return WOULD_BLOCK;