Loading libs/input/tests/InputPublisherAndConsumer_test.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -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() { Loading services/inputflinger/dispatcher/Entry.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -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() { Loading Loading @@ -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); Loading Loading
libs/input/tests/InputPublisherAndConsumer_test.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -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() { Loading
services/inputflinger/dispatcher/Entry.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -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() { Loading Loading @@ -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); Loading