diff options
-rw-r--r-- | libs/input/tests/InputPublisherAndConsumer_test.cpp | 4 | ||||
-rw-r--r-- | services/inputflinger/dispatcher/Entry.cpp | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/libs/input/tests/InputPublisherAndConsumer_test.cpp b/libs/input/tests/InputPublisherAndConsumer_test.cpp index 1452745d01..4f53dc9ec4 100644 --- a/libs/input/tests/InputPublisherAndConsumer_test.cpp +++ b/libs/input/tests/InputPublisherAndConsumer_test.cpp @@ -54,8 +54,12 @@ protected: }; TEST_F(InputPublisherAndConsumerTest, GetChannel_ReturnsTheChannel) { + ASSERT_NE(nullptr, mPublisher->getChannel()); + ASSERT_NE(nullptr, mConsumer->getChannel()); EXPECT_EQ(mServerChannel.get(), mPublisher->getChannel().get()); EXPECT_EQ(mClientChannel.get(), mConsumer->getChannel().get()); + ASSERT_EQ(mPublisher->getChannel()->getConnectionToken(), + mConsumer->getChannel()->getConnectionToken()); } void InputPublisherAndConsumerTest::PublishAndConsumeKeyEvent() { diff --git a/services/inputflinger/dispatcher/Entry.cpp b/services/inputflinger/dispatcher/Entry.cpp index b6b7e63407..5103b4c7c0 100644 --- a/services/inputflinger/dispatcher/Entry.cpp +++ b/services/inputflinger/dispatcher/Entry.cpp @@ -141,11 +141,12 @@ std::string KeyEntry::getDescription() const { if (!GetBoolProperty("ro.debuggable", false)) { return "KeyEvent"; } - return StringPrintf("KeyEvent(deviceId=%d, source=0x%08x, displayId=%" PRId32 ", action=%s, " + return StringPrintf("KeyEvent(deviceId=%d, eventTime=%" PRIu64 + ", source=0x%08x, displayId=%" PRId32 ", action=%s, " "flags=0x%08x, keyCode=%d, scanCode=%d, metaState=0x%08x, " "repeatCount=%d), policyFlags=0x%08x", - deviceId, source, displayId, KeyEvent::actionToString(action), flags, - keyCode, scanCode, metaState, repeatCount, policyFlags); + deviceId, eventTime, source, displayId, KeyEvent::actionToString(action), + flags, keyCode, scanCode, metaState, repeatCount, policyFlags); } void KeyEntry::recycle() { @@ -200,12 +201,13 @@ std::string MotionEntry::getDescription() const { return "MotionEvent"; } std::string msg; - msg += StringPrintf("MotionEvent(deviceId=%d, source=0x%08x, displayId=%" PRId32 + msg += StringPrintf("MotionEvent(deviceId=%d, eventTime=%" PRIu64 + ", source=0x%08x, displayId=%" PRId32 ", action=%s, actionButton=0x%08x, flags=0x%08x, metaState=0x%08x, " "buttonState=0x%08x, " "classification=%s, edgeFlags=0x%08x, xPrecision=%.1f, yPrecision=%.1f, " "xCursorPosition=%0.1f, yCursorPosition=%0.1f, pointers=[", - deviceId, source, displayId, MotionEvent::actionToString(action), + deviceId, eventTime, source, displayId, MotionEvent::actionToString(action), actionButton, flags, metaState, buttonState, motionClassificationToString(classification), edgeFlags, xPrecision, yPrecision, xCursorPosition, yCursorPosition); |