Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a32108a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add eventTime print out to Entry dump"

parents ec514917 a1188f5b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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() {
+7 −5
Original line number Diff line number Diff line
@@ -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);