ANDROID: Revert "HID: do not assume HAT Switch logical max < 8"

This reverts commit 65ad580a14.

This causes CTS failures, in particular
android.hardware.input.cts.tests.RazerKishiTest#testAllMotions fails
with that commit:

    java.lang.AssertionError: Sanity check - should not produce any events: Received unexpected event MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=0.0, y[0]=0.0, toolType[0]=TOOL_TYPE_UNKNOWN, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=287193, downTime=0, deviceId=5, source=0x1000010, displayId=0, eventId=-764670775 }
        at org.junit.Assert.fail(Assert.java:89)
        at android.hardware.input.cts.tests.InputTestCase.failWithMessage(InputTestCase.java:412)
        at android.hardware.input.cts.tests.InputTestCase.verifyFirstEvents(InputTestCase.java:271)
        at android.hardware.input.cts.tests.InputTestCase.verifyEvents(InputTestCase.java:260)
        at android.hardware.input.cts.tests.InputHidTestCase.testInputEvents(InputHidTestCase.java:222)
        at android.hardware.input.cts.tests.RazerKishiTest.testAllMotions(RazerKishiTest.java:43)

Revert while we further investigate the issue.

Test: TH
Bug: 354875759
Change-Id: Ib26cff0b0e3b41096890cec30aef4115653642d0
Signed-off-by: André Draszik <draszik@google.com>
This commit is contained in:
André Draszik
2024-07-23 10:50:24 +01:00
committed by Treehugger Robot
parent 0d9a4dbb7e
commit f48817b39a
+3 -3
View File
@@ -474,9 +474,9 @@ struct hid_usage {
__s8 wheel_factor; /* 120/resolution_multiplier */
__u16 code; /* input driver code */
__u8 type; /* input driver type */
__s16 hat_min; /* hat switch fun */
__s16 hat_max; /* ditto */
__s16 hat_dir; /* ditto */
__s8 hat_min; /* hat switch fun */
__s8 hat_max; /* ditto */
__s8 hat_dir; /* ditto */
__s16 wheel_accumulated; /* hi-res wheel */
};