Loading libs/input/TouchVideoFrame.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -43,13 +43,13 @@ const struct timeval& TouchVideoFrame::getTimestamp() const { return mTimestamp; void TouchVideoFrame::rotate(ui::Rotation orientation) { switch (orientation) { case ui::ROTATION_90: rotateQuarterTurn(false /*clockwise*/); rotateQuarterTurn(/*clockwise=*/false); break; case ui::ROTATION_180: rotate180(); break; case ui::ROTATION_270: rotateQuarterTurn(true /*clockwise*/); rotateQuarterTurn(/*clockwise=*/true); break; case ui::ROTATION_0: // No need to rotate if there's no rotation. Loading libs/input/VelocityTracker.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -157,10 +157,10 @@ void VelocityTracker::configureStrategy(int32_t axis) { std::unique_ptr<VelocityTrackerStrategy> createdStrategy; if (mOverrideStrategy != VelocityTracker::Strategy::DEFAULT) { createdStrategy = createStrategy(mOverrideStrategy, isDifferentialAxis /* deltaValues */); createdStrategy = createStrategy(mOverrideStrategy, /*deltaValues=*/isDifferentialAxis); } else { createdStrategy = createStrategy(DEFAULT_STRATEGY_BY_AXIS.at(axis), isDifferentialAxis /* deltaValues */); /*deltaValues=*/isDifferentialAxis); } LOG_ALWAYS_FATAL_IF(createdStrategy == nullptr, Loading Loading @@ -495,7 +495,7 @@ static bool solveLeastSquares(const std::vector<float>& x, const std::vector<flo } ALOGD_IF(DEBUG_STRATEGY, " - a=%s", matrixToString(&a[0][0], m, n, false /*rowMajor*/).c_str()); matrixToString(&a[0][0], m, n, /*rowMajor=*/false).c_str()); // Apply the Gram-Schmidt process to A to obtain its QR decomposition. float q[n][m]; // orthonormal basis, column-major order Loading Loading @@ -527,8 +527,8 @@ static bool solveLeastSquares(const std::vector<float>& x, const std::vector<flo } } if (DEBUG_STRATEGY) { ALOGD(" - q=%s", matrixToString(&q[0][0], m, n, false /*rowMajor*/).c_str()); ALOGD(" - r=%s", matrixToString(&r[0][0], n, n, true /*rowMajor*/).c_str()); ALOGD(" - q=%s", matrixToString(&q[0][0], m, n, /*rowMajor=*/false).c_str()); ALOGD(" - r=%s", matrixToString(&r[0][0], n, n, /*rowMajor=*/true).c_str()); // calculate QR, if we factored A correctly then QR should equal A float qr[n][m]; Loading @@ -540,7 +540,7 @@ static bool solveLeastSquares(const std::vector<float>& x, const std::vector<flo } } } ALOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, false /*rowMajor*/).c_str()); ALOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, /*rowMajor=*/false).c_str()); } // Solve R B = Qt W Y to find B. This is easy because R is upper triangular. Loading libs/input/tests/InputEvent_test.cpp +14 −14 Original line number Diff line number Diff line Loading @@ -531,7 +531,7 @@ TEST_F(MotionEventTest, CopyFrom_KeepHistory) { initializeEventWithHistory(&event); MotionEvent copy; copy.copyFrom(&event, true /*keepHistory*/); copy.copyFrom(&event, /*keepHistory=*/true); ASSERT_NO_FATAL_FAILURE(assertEqualsEventWithHistory(&event)); } Loading @@ -541,7 +541,7 @@ TEST_F(MotionEventTest, CopyFrom_DoNotKeepHistory) { initializeEventWithHistory(&event); MotionEvent copy; copy.copyFrom(&event, false /*keepHistory*/); copy.copyFrom(&event, /*keepHistory=*/false); ASSERT_EQ(event.getPointerCount(), copy.getPointerCount()); ASSERT_EQ(0U, copy.getHistorySize()); Loading Loading @@ -642,12 +642,12 @@ TEST_F(MotionEventTest, Transform) { } MotionEvent event; ui::Transform identityTransform; event.initialize(InputEvent::nextId(), 0 /*deviceId*/, AINPUT_SOURCE_TOUCHSCREEN, DISPLAY_ID, INVALID_HMAC, AMOTION_EVENT_ACTION_MOVE, 0 /*actionButton*/, 0 /*flags*/, AMOTION_EVENT_EDGE_FLAG_NONE, AMETA_NONE, 0 /*buttonState*/, MotionClassification::NONE, identityTransform, 0 /*xPrecision*/, 0 /*yPrecision*/, 3 + RADIUS /*xCursorPosition*/, 2 /*yCursorPosition*/, identityTransform, 0 /*downTime*/, 0 /*eventTime*/, pointerCount, event.initialize(InputEvent::nextId(), /*deviceId=*/0, AINPUT_SOURCE_TOUCHSCREEN, DISPLAY_ID, INVALID_HMAC, AMOTION_EVENT_ACTION_MOVE, /*actionButton=*/0, /*flags=*/0, AMOTION_EVENT_EDGE_FLAG_NONE, AMETA_NONE, /*buttonState=*/0, MotionClassification::NONE, identityTransform, /*xPrecision=*/0, /*yPrecision=*/0, /*xCursorPosition=*/3 + RADIUS, /*yCursorPosition=*/2, identityTransform, /*downTime=*/0, /*eventTime=*/0, pointerCount, pointerProperties, pointerCoords); float originalRawX = 0 + 3; float originalRawY = -RADIUS + 2; Loading Loading @@ -848,12 +848,12 @@ TEST_F(MotionEventTest, Initialize_SetsClassification) { ui::Transform identityTransform; for (MotionClassification classification : classifications) { event.initialize(InputEvent::nextId(), 0 /*deviceId*/, AINPUT_SOURCE_TOUCHSCREEN, event.initialize(InputEvent::nextId(), /*deviceId=*/0, AINPUT_SOURCE_TOUCHSCREEN, DISPLAY_ID, INVALID_HMAC, AMOTION_EVENT_ACTION_DOWN, 0, 0, AMOTION_EVENT_EDGE_FLAG_NONE, AMETA_NONE, 0, classification, identityTransform, 0, 0, AMOTION_EVENT_INVALID_CURSOR_POSITION, AMOTION_EVENT_INVALID_CURSOR_POSITION, identityTransform, 0 /*downTime*/, 0 /*eventTime*/, pointerCount, pointerProperties, pointerCoords); AMOTION_EVENT_INVALID_CURSOR_POSITION, identityTransform, /*downTime=*/0, /*eventTime=*/0, pointerCount, pointerProperties, pointerCoords); ASSERT_EQ(classification, event.getClassification()); } } Loading @@ -870,11 +870,11 @@ TEST_F(MotionEventTest, Initialize_SetsCursorPosition) { } ui::Transform identityTransform; event.initialize(InputEvent::nextId(), 0 /*deviceId*/, AINPUT_SOURCE_MOUSE, DISPLAY_ID, event.initialize(InputEvent::nextId(), /*deviceId=*/0, AINPUT_SOURCE_MOUSE, DISPLAY_ID, INVALID_HMAC, AMOTION_EVENT_ACTION_DOWN, 0, 0, AMOTION_EVENT_EDGE_FLAG_NONE, AMETA_NONE, 0, MotionClassification::NONE, identityTransform, 0, 0, 280 /*xCursorPosition*/, 540 /*yCursorPosition*/, identityTransform, 0 /*downTime*/, 0 /*eventTime*/, pointerCount, pointerProperties, /*xCursorPosition=*/280, /*yCursorPosition=*/540, identityTransform, /*downTime=*/0, /*eventTime=*/0, pointerCount, pointerProperties, pointerCoords); event.offsetLocation(20, 60); ASSERT_EQ(280, event.getRawXCursorPosition()); Loading libs/input/tests/InputPublisherAndConsumer_test.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeKeyEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; Loading Loading @@ -201,7 +201,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeMotionEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; Loading Loading @@ -294,7 +294,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeFocusEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; ASSERT_TRUE(event != nullptr) << "consumer should have returned non-NULL event"; Loading Loading @@ -335,7 +335,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeCaptureEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; ASSERT_TRUE(event != nullptr) << "consumer should have returned non-NULL event"; Loading Loading @@ -377,7 +377,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeDragEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; ASSERT_TRUE(event != nullptr) << "consumer should have returned non-NULL event"; Loading Loading @@ -419,7 +419,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeTouchModeEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; ASSERT_TRUE(event != nullptr) << "consumer should have returned non-NULL event"; Loading libs/input/tests/TouchResampling_test.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ protected: mPublisher = std::make_unique<InputPublisher>(std::move(serverChannel)); mConsumer = std::make_unique<InputConsumer>(std::move(clientChannel), true /* enableTouchResampling */); /*enableTouchResampling=*/true); } status_t publishSimpleMotionEventWithCoords(int32_t action, nsecs_t eventTime, Loading @@ -79,11 +79,11 @@ status_t TouchResamplingTest::publishSimpleMotionEventWithCoords( if (action == AMOTION_EVENT_ACTION_DOWN && eventTime != 0) { ADD_FAILURE() << "Downtime should be equal to 0 (hardcoded for convenience)"; } return mPublisher->publishMotionEvent(mSeq++, InputEvent::nextId(), 1 /*deviceId*/, AINPUT_SOURCE_TOUCHSCREEN, 0 /*displayId*/, INVALID_HMAC, action, 0 /*actionButton*/, 0 /*flags*/, 0 /*edgeFlags*/, AMETA_NONE, 0 /*buttonState*/, MotionClassification::NONE, identityTransform, 0 /*xPrecision*/, 0 /*yPrecision*/, return mPublisher->publishMotionEvent(mSeq++, InputEvent::nextId(), /*deviceId=*/1, AINPUT_SOURCE_TOUCHSCREEN, /*displayId=*/0, INVALID_HMAC, action, /*actionButton=*/0, /*flags=*/0, /*edgeFlags=*/0, AMETA_NONE, /*buttonState=*/0, MotionClassification::NONE, identityTransform, /*xPrecision=*/0, /*yPrecision=*/0, AMOTION_EVENT_INVALID_CURSOR_POSITION, AMOTION_EVENT_INVALID_CURSOR_POSITION, identityTransform, downTime, eventTime, properties.size(), properties.data(), Loading Loading @@ -161,7 +161,7 @@ void TouchResamplingTest::consumeInputEventEntries(const std::vector<InputEventE uint32_t consumeSeq; InputEvent* event; status_t status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, frameTime.count(), status_t status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, frameTime.count(), &consumeSeq, &event); ASSERT_EQ(OK, status); MotionEvent* motionEvent = static_cast<MotionEvent*>(event); Loading Loading
libs/input/TouchVideoFrame.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -43,13 +43,13 @@ const struct timeval& TouchVideoFrame::getTimestamp() const { return mTimestamp; void TouchVideoFrame::rotate(ui::Rotation orientation) { switch (orientation) { case ui::ROTATION_90: rotateQuarterTurn(false /*clockwise*/); rotateQuarterTurn(/*clockwise=*/false); break; case ui::ROTATION_180: rotate180(); break; case ui::ROTATION_270: rotateQuarterTurn(true /*clockwise*/); rotateQuarterTurn(/*clockwise=*/true); break; case ui::ROTATION_0: // No need to rotate if there's no rotation. Loading
libs/input/VelocityTracker.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -157,10 +157,10 @@ void VelocityTracker::configureStrategy(int32_t axis) { std::unique_ptr<VelocityTrackerStrategy> createdStrategy; if (mOverrideStrategy != VelocityTracker::Strategy::DEFAULT) { createdStrategy = createStrategy(mOverrideStrategy, isDifferentialAxis /* deltaValues */); createdStrategy = createStrategy(mOverrideStrategy, /*deltaValues=*/isDifferentialAxis); } else { createdStrategy = createStrategy(DEFAULT_STRATEGY_BY_AXIS.at(axis), isDifferentialAxis /* deltaValues */); /*deltaValues=*/isDifferentialAxis); } LOG_ALWAYS_FATAL_IF(createdStrategy == nullptr, Loading Loading @@ -495,7 +495,7 @@ static bool solveLeastSquares(const std::vector<float>& x, const std::vector<flo } ALOGD_IF(DEBUG_STRATEGY, " - a=%s", matrixToString(&a[0][0], m, n, false /*rowMajor*/).c_str()); matrixToString(&a[0][0], m, n, /*rowMajor=*/false).c_str()); // Apply the Gram-Schmidt process to A to obtain its QR decomposition. float q[n][m]; // orthonormal basis, column-major order Loading Loading @@ -527,8 +527,8 @@ static bool solveLeastSquares(const std::vector<float>& x, const std::vector<flo } } if (DEBUG_STRATEGY) { ALOGD(" - q=%s", matrixToString(&q[0][0], m, n, false /*rowMajor*/).c_str()); ALOGD(" - r=%s", matrixToString(&r[0][0], n, n, true /*rowMajor*/).c_str()); ALOGD(" - q=%s", matrixToString(&q[0][0], m, n, /*rowMajor=*/false).c_str()); ALOGD(" - r=%s", matrixToString(&r[0][0], n, n, /*rowMajor=*/true).c_str()); // calculate QR, if we factored A correctly then QR should equal A float qr[n][m]; Loading @@ -540,7 +540,7 @@ static bool solveLeastSquares(const std::vector<float>& x, const std::vector<flo } } } ALOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, false /*rowMajor*/).c_str()); ALOGD(" - qr=%s", matrixToString(&qr[0][0], m, n, /*rowMajor=*/false).c_str()); } // Solve R B = Qt W Y to find B. This is easy because R is upper triangular. Loading
libs/input/tests/InputEvent_test.cpp +14 −14 Original line number Diff line number Diff line Loading @@ -531,7 +531,7 @@ TEST_F(MotionEventTest, CopyFrom_KeepHistory) { initializeEventWithHistory(&event); MotionEvent copy; copy.copyFrom(&event, true /*keepHistory*/); copy.copyFrom(&event, /*keepHistory=*/true); ASSERT_NO_FATAL_FAILURE(assertEqualsEventWithHistory(&event)); } Loading @@ -541,7 +541,7 @@ TEST_F(MotionEventTest, CopyFrom_DoNotKeepHistory) { initializeEventWithHistory(&event); MotionEvent copy; copy.copyFrom(&event, false /*keepHistory*/); copy.copyFrom(&event, /*keepHistory=*/false); ASSERT_EQ(event.getPointerCount(), copy.getPointerCount()); ASSERT_EQ(0U, copy.getHistorySize()); Loading Loading @@ -642,12 +642,12 @@ TEST_F(MotionEventTest, Transform) { } MotionEvent event; ui::Transform identityTransform; event.initialize(InputEvent::nextId(), 0 /*deviceId*/, AINPUT_SOURCE_TOUCHSCREEN, DISPLAY_ID, INVALID_HMAC, AMOTION_EVENT_ACTION_MOVE, 0 /*actionButton*/, 0 /*flags*/, AMOTION_EVENT_EDGE_FLAG_NONE, AMETA_NONE, 0 /*buttonState*/, MotionClassification::NONE, identityTransform, 0 /*xPrecision*/, 0 /*yPrecision*/, 3 + RADIUS /*xCursorPosition*/, 2 /*yCursorPosition*/, identityTransform, 0 /*downTime*/, 0 /*eventTime*/, pointerCount, event.initialize(InputEvent::nextId(), /*deviceId=*/0, AINPUT_SOURCE_TOUCHSCREEN, DISPLAY_ID, INVALID_HMAC, AMOTION_EVENT_ACTION_MOVE, /*actionButton=*/0, /*flags=*/0, AMOTION_EVENT_EDGE_FLAG_NONE, AMETA_NONE, /*buttonState=*/0, MotionClassification::NONE, identityTransform, /*xPrecision=*/0, /*yPrecision=*/0, /*xCursorPosition=*/3 + RADIUS, /*yCursorPosition=*/2, identityTransform, /*downTime=*/0, /*eventTime=*/0, pointerCount, pointerProperties, pointerCoords); float originalRawX = 0 + 3; float originalRawY = -RADIUS + 2; Loading Loading @@ -848,12 +848,12 @@ TEST_F(MotionEventTest, Initialize_SetsClassification) { ui::Transform identityTransform; for (MotionClassification classification : classifications) { event.initialize(InputEvent::nextId(), 0 /*deviceId*/, AINPUT_SOURCE_TOUCHSCREEN, event.initialize(InputEvent::nextId(), /*deviceId=*/0, AINPUT_SOURCE_TOUCHSCREEN, DISPLAY_ID, INVALID_HMAC, AMOTION_EVENT_ACTION_DOWN, 0, 0, AMOTION_EVENT_EDGE_FLAG_NONE, AMETA_NONE, 0, classification, identityTransform, 0, 0, AMOTION_EVENT_INVALID_CURSOR_POSITION, AMOTION_EVENT_INVALID_CURSOR_POSITION, identityTransform, 0 /*downTime*/, 0 /*eventTime*/, pointerCount, pointerProperties, pointerCoords); AMOTION_EVENT_INVALID_CURSOR_POSITION, identityTransform, /*downTime=*/0, /*eventTime=*/0, pointerCount, pointerProperties, pointerCoords); ASSERT_EQ(classification, event.getClassification()); } } Loading @@ -870,11 +870,11 @@ TEST_F(MotionEventTest, Initialize_SetsCursorPosition) { } ui::Transform identityTransform; event.initialize(InputEvent::nextId(), 0 /*deviceId*/, AINPUT_SOURCE_MOUSE, DISPLAY_ID, event.initialize(InputEvent::nextId(), /*deviceId=*/0, AINPUT_SOURCE_MOUSE, DISPLAY_ID, INVALID_HMAC, AMOTION_EVENT_ACTION_DOWN, 0, 0, AMOTION_EVENT_EDGE_FLAG_NONE, AMETA_NONE, 0, MotionClassification::NONE, identityTransform, 0, 0, 280 /*xCursorPosition*/, 540 /*yCursorPosition*/, identityTransform, 0 /*downTime*/, 0 /*eventTime*/, pointerCount, pointerProperties, /*xCursorPosition=*/280, /*yCursorPosition=*/540, identityTransform, /*downTime=*/0, /*eventTime=*/0, pointerCount, pointerProperties, pointerCoords); event.offsetLocation(20, 60); ASSERT_EQ(280, event.getRawXCursorPosition()); Loading
libs/input/tests/InputPublisherAndConsumer_test.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeKeyEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; Loading Loading @@ -201,7 +201,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeMotionEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; Loading Loading @@ -294,7 +294,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeFocusEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; ASSERT_TRUE(event != nullptr) << "consumer should have returned non-NULL event"; Loading Loading @@ -335,7 +335,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeCaptureEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; ASSERT_TRUE(event != nullptr) << "consumer should have returned non-NULL event"; Loading Loading @@ -377,7 +377,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeDragEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; ASSERT_TRUE(event != nullptr) << "consumer should have returned non-NULL event"; Loading Loading @@ -419,7 +419,7 @@ void InputPublisherAndConsumerTest::PublishAndConsumeTouchModeEvent() { uint32_t consumeSeq; InputEvent* event; status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, -1, &consumeSeq, &event); status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, -1, &consumeSeq, &event); ASSERT_EQ(OK, status) << "consumer consume should return OK"; ASSERT_TRUE(event != nullptr) << "consumer should have returned non-NULL event"; Loading
libs/input/tests/TouchResampling_test.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ protected: mPublisher = std::make_unique<InputPublisher>(std::move(serverChannel)); mConsumer = std::make_unique<InputConsumer>(std::move(clientChannel), true /* enableTouchResampling */); /*enableTouchResampling=*/true); } status_t publishSimpleMotionEventWithCoords(int32_t action, nsecs_t eventTime, Loading @@ -79,11 +79,11 @@ status_t TouchResamplingTest::publishSimpleMotionEventWithCoords( if (action == AMOTION_EVENT_ACTION_DOWN && eventTime != 0) { ADD_FAILURE() << "Downtime should be equal to 0 (hardcoded for convenience)"; } return mPublisher->publishMotionEvent(mSeq++, InputEvent::nextId(), 1 /*deviceId*/, AINPUT_SOURCE_TOUCHSCREEN, 0 /*displayId*/, INVALID_HMAC, action, 0 /*actionButton*/, 0 /*flags*/, 0 /*edgeFlags*/, AMETA_NONE, 0 /*buttonState*/, MotionClassification::NONE, identityTransform, 0 /*xPrecision*/, 0 /*yPrecision*/, return mPublisher->publishMotionEvent(mSeq++, InputEvent::nextId(), /*deviceId=*/1, AINPUT_SOURCE_TOUCHSCREEN, /*displayId=*/0, INVALID_HMAC, action, /*actionButton=*/0, /*flags=*/0, /*edgeFlags=*/0, AMETA_NONE, /*buttonState=*/0, MotionClassification::NONE, identityTransform, /*xPrecision=*/0, /*yPrecision=*/0, AMOTION_EVENT_INVALID_CURSOR_POSITION, AMOTION_EVENT_INVALID_CURSOR_POSITION, identityTransform, downTime, eventTime, properties.size(), properties.data(), Loading Loading @@ -161,7 +161,7 @@ void TouchResamplingTest::consumeInputEventEntries(const std::vector<InputEventE uint32_t consumeSeq; InputEvent* event; status_t status = mConsumer->consume(&mEventFactory, true /*consumeBatches*/, frameTime.count(), status_t status = mConsumer->consume(&mEventFactory, /*consumeBatches=*/true, frameTime.count(), &consumeSeq, &event); ASSERT_EQ(OK, status); MotionEvent* motionEvent = static_cast<MotionEvent*>(event); Loading