Fix MultiTouchInputMapperTest#Process_TouchpadCapture test failure.
Do not consume raw event because of checking inside surface pass,
if device mode is unscaled. This will prevent the first motion event
to be consumed unexpectedly for touchpad pointer capture mode.
Bug: 162974380
Test: atest MultiTouchInputMapperTest#Process_TouchpadCapture
Change-Id: I3c5b0a4514d67990540967d7fa3d6b48011d3884
diff --git a/services/inputflinger/tests/InputReader_test.cpp b/services/inputflinger/tests/InputReader_test.cpp
index dbca7a2..4b00ee4 100644
--- a/services/inputflinger/tests/InputReader_test.cpp
+++ b/services/inputflinger/tests/InputReader_test.cpp
@@ -7563,6 +7563,7 @@
// identical to what the hardware sends (accounting for any
// calibration).
// FINGER 0 DOWN
+ processSlot(mapper, 0);
processId(mapper, 1);
processPosition(mapper, 100 + RAW_X_MIN, 100 + RAW_Y_MIN);
processKey(mapper, BTN_TOUCH, 1);
@@ -7586,7 +7587,8 @@
// expect coord[0] to contain previous location, coord[1] to contain new touch 1 location
ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
- ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | 0x0100, args.action);
+ ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+ args.action);
ASSERT_EQ(2U, args.pointerCount);
ASSERT_EQ(0, args.pointerProperties[0].id);
ASSERT_EQ(1, args.pointerProperties[1].id);