- May 24, 2023
-
-
Siarhei Vishniakou authored
This test will provide RawEvent's to TouchpadInputMapper and will look at the returned events. The main purpose of this CL is to document the existing behaviour of CursorInputMapper and TouchpadInputMapper. The tests highlights that today, dispatcher must handle the case where the touch starts without HOVER_EXIT. That means that the dispatcher logs of "conflicting pointer actions" can be mostly ignored. The goal was to make the tests for the two mappers as similar to each other as possible. A slightly different testing infra is introduced here compared to the one used in InputReader_test. Changes: * Use mocks for interfaces instead of constructed objects This helps figure out which parts are important to mock for a specific test vs which ones are not. When a function is called with a parameters that the mocks aren't expecting, a warning is printed during test run. This helps identify the complete state needed in order for the test to execute. * No longer require InstrumentedInputReader * No longer require a listener. We only check the events that are coming from the 'process' call, which is what the interface for the mapper does. Limitations: * Still require an InputDevice object to be constructed in order to test InputMappers. Ideally, a mapper would only depend on the EventHub state (to read the current value of keys / axes after a reset). Bug: 263319225 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests --gtest_filter="*HoverAndLeftButtonPress*" Change-Id: I7de0dee7abcf6bcb9d3283e29d9a85de2f331a44
-
- May 18, 2023
-
-
Brian Duddie authored
Correctly associate comments with the applicable fields by moving the comment to before the field declaration. Fixes: 283307966 Test: presubmit Change-Id: Ibb87216f5d0deb458248df8989fdfeed79edf0e4
-
- May 16, 2023
-
-
Siarhei Vishniakou authored
To make the code more readable and reusable, move the creation of InputTarget into a separate function. In a future commit, the new function ' createInputTargetLocked' will be needed in other places of InputDispatcher, too. Bug: 263319225 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests Change-Id: Iae78c7c812afe5bb059c56669a3de00fdfc496ef
-
- May 12, 2023
-
-
Steven Moreland authored
Bug: 266596626 63a0fd19 Change-Id: Icd1164728c38b9d813dbe5f47118a08c4bef48dc
-
- Apr 28, 2023
-
-
Vishnu Nair authored
Test: spellcheck Fixes: 271461920 Change-Id: I7a86abd1f764af73288edf575a288d4fcab02b86
-
- Apr 24, 2023
-
-
Siarhei Vishniakou authored
Previously, KeyedVector was used in KeyCharacterMap. Convert this to the std::unordered_map. Bug: 278299254 Test: m checkinput Test: m libinput_tests && $ANDROID_HOST_OUT/nativetest64/libinput_tests/libinput_tests Change-Id: I643aa8cc8ae0c68ade4d11d02e34be64faf7f157
-
- Apr 20, 2023
-
-
Vaibhav Devmurari authored
Virtual keyboard creation uses KEYBOARD_LAYOUT_ASSOCIATION reconfig to associated input device with keyboard layout info. But this can happen after input device added (Race condition between device creation and input device added callback.) If input device already added then we sometimes don't get input device changed callback since the generation is same. Test: atest VirtualKeyboardLayoutTest Bug: 277778640 Change-Id: I218b6d797da27ec3a383fbcd2ebeacb0afbf5fab
-
- Apr 19, 2023
-
-
John Reck authored
Bug: 278780207 Test: n/a doc only change Change-Id: I7e47f63ce70d28827188e3848a725e1608722172
-
- Apr 18, 2023
-
-
Dominik Laskowski authored
Avoid std::cref to a local variable, which is not intuitive and incurs construction in the non-fallback case. Bug: 185536303 Test: ftl_test Change-Id: I1c5a94bdab105a04f8230fe762bdc433eea5c97a
-
Prabir Pradhan authored
Add a default parameter to any() so that we can easily test if any of the bits in the bitfield have been set. Bug: 245989146 Test: atest ftl_test Change-Id: Ibee03c2f70288d1a353e1d86539fb7f88b1e5d3c
-
Biswarup Pal authored
Test: Verify that virtual input timestamps are propagated to EventHub correctly, provided that uinput supports event timestamps Bug: 271946580 Change-Id: Ifb79654000e1040ccfb85d35dee856a24db5eb73
-
- Apr 17, 2023
-
-
Siarhei Vishniakou authored
The call getKey can fail. Rather than returning a separate bool that the caller might ignore, return a pointer to simplify the code. Bug: 278299254 Test: m libinput_tests && $ANDROID_HOST_OUT/nativetest64/libinput_tests/libinput_tests Change-Id: I28c25bee8890bdc90ca7e069c803423a7420e6b4
-
Siarhei Vishniakou authored
Since the parameter is assumed to be non-null, pass it by reference. Bug: 274058082 Test: m libinput_tests && $ANDROID_HOST_OUT/nativetest64/libinput_tests/libinput_tests Change-Id: Iedf8970a57e4463e6addc8ee1013feb3ee60c009
-
- Apr 14, 2023
-
-
Greg Pataky authored
This goes through the file and adds either `#` or `{@link ...}` doxygen linkage for all enum values, types, and functions to allow deep linking to be generated. Test: `development/tools/ndk/build_ndk_docs.py` and manual inspection of the generated doc. Change-Id: I0b6a154c9ba2cb4749d007b22088675667b6d7b4
-
- Apr 13, 2023
-
-
Siarhei Vishniakou authored
This will increase type safety and simplify some of the printing. Bug: 274073185 Test: m checkinput Change-Id: I848c2f156cc23232c50d2338b4788be3232dba1a
-
- Apr 11, 2023
-
-
Cody Heiner authored
Test: Corresponding added RingBuffer tests pass (`atest libinput_tests`) Bug: 268245099 Change-Id: If330940e67e70d809748b2aaa6156bed835c6c9d
-
- Apr 06, 2023
-
-
Cody Heiner authored
Test: build succeeds, `atest libinput-tests` passes. Bug: 268245099 Change-Id: I030da703a907eef44e85d186144eddc53b5998cc
-
- Mar 31, 2023
-
-
Charles Lin authored
Key map can use both scan code and usage code. Adding usage code check to avoid misjudgment. Bug: 275526611 Test: In Android TV, pairing a BT RCU with keylayout which has usage page/id for DPAD. In PlayStore app search box, make sure user can move focus to search result by pressing dpad DOWN key. Change-Id: I70687d308899537e457192458176b1553c350f14
-
- Mar 28, 2023
-
-
Siarhei Vishniakou authored
For better type safety, use enum class when sending tool type. Bug: 198472780 Test: atest libinput_tests inputflinger_tests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:09a8fe42ba1d218c2f445e4fd5bc387e260ae067) Merged-In: I371f08087b9513b6f75966c124de77bc12f8324e Change-Id: I371f08087b9513b6f75966c124de77bc12f8324e
-
- Mar 16, 2023
-
-
John Reck authored
Bug: 272103317 Test: n/a doc only change Change-Id: I8bebb31f0bd38e36139026a539030e5b61b75b4c
-
- Mar 14, 2023
-
-
Harry Cutts authored
Using optionals rather than returning a boolean forces the caller to check whether the property is present, enforced by the compiler, and also allows a more succinct syntax in some cases. Bug: 245989146 Test: atest inputflinger_test Test: connect Apple Magic Trackpad 2, check that gesture properties are set correctly in dumpsys input Change-Id: Ia0fde1f67269e6e7149f297def626e572fd7790f
-
- Mar 13, 2023
-
-
Harry Cutts authored
a53cb97a Change-Id: I5463f938665212362b8780e1c646a4b2bf8ad10a
-
- Mar 10, 2023
-
-
Prabir Pradhan authored
When tests inject input events at a location on the screen, the dispatched event is expected to have the same coordinates. However, on scaled devices, this may not always be the case due to precision losses incurred through floating point arithmetics. For example, it was possible for an injected event with a coordinate of 1.0 to end up with a value of 0.9997. To combat this issue, we will round transformed axis values that are leaving a MotionEvent to a precision of 0.001. After this CL, even if the injection process results in precision losses, they should be overcome by rounding, assuming injection does not require greater precision. This will solve the issue where input injected to an inclusive edge of the View bounds was not getting dispatched to the View due to precision losses. Bug: 264978231 Bug: 260965930 Test: atest libinput_tests Test: atest inputflinger_tests Test: atest HoverTest (with screen size override) Change-Id: I81062597058361a1218e6873d34b9b0d2fbfad96 Merged-In: I81062597058361a1218e6873d34b9b0d2fbfad96
-
Prabir Pradhan authored
When tests inject input events at a location on the screen, the dispatched event is expected to have the same coordinates. However, on scaled devices, this may not always be the case due to precision losses incurred through floating point arithmetics. For example, it was possible for an injected event with a coordinate of 1.0 to end up with a value of 0.9997. To combat this issue, we will round transformed axis values that are leaving a MotionEvent to a precision of 0.001. After this CL, even if the injection process results in precision losses, they should be overcome by rounding, assuming injection does not require greater precision. This will solve the issue where input injected to an inclusive edge of the View bounds was not getting dispatched to the View due to precision losses. Bug: 264978231 Bug: 260965930 Test: atest libinput_tests Test: atest inputflinger_tests Test: atest HoverTest (with screen size override) Change-Id: I81062597058361a1218e6873d34b9b0d2fbfad96
-
Sebastian Pickl authored
Revert submission 21750284-touchpad-specific-tuning Reason for revert: resolves flake b/272308130 according to culprit assistant https://android-build.googleplex.com/builds/culprit-assistant/run/6257e5da-1bb0-437a-8fab-f04c27d462b3 verified by 6 runs in abtd https://android-build.googleplex.com/builds/abtd/run/L75900000959044402 Reverted changes: /q/submissionid:21750284-touchpad-specific-tuning Change-Id: I62078104a96d588bd321459e5a069dd0de5933bd
-
- Mar 07, 2023
-
-
Dominik Laskowski authored
Bug: 185536303 Test: ftl_test Change-Id: Idf0bac4711111c8cb28e8624bb146a76ec1ff38b
-
Harry Cutts authored
Specific touchpads often require small tweaks to the Gestures library's gesture properties to work well. Examples of such tweaks include palm thresholds, or the parameters to the stationary wiggle filter. To support this, allow properties to be set using the 'gestureProp.' prefix in IDC files, with the spaces in property names replaced by underscores. For example, to set the "Pressure Calibration Offset" property to 30, add this line to the relevant IDC file: gestureProp.Pressure_Calibration_Offset = 30 Only single-valued boolean, integer, or real properties can be set this way. There's currently no use case for strings. The only use case for arrays is for acceleration curves, which wouldn't work well with this system anyway since they'd be overridden by the pointer speed settings. Bug: 271251605 Test: atest inputflinger_tests Test: connect Apple Magic Trackpad 2, check properties are set correctly in dumpsys input Change-Id: I1bf97c9753e48c00d3dc3098cb676f7baebc84ce
-
- Mar 04, 2023
-
-
Siarhei Vishniakou authored
Before this CL, the testing binary could not execute properly when invoked directly. This is because the current working directory does not get set. To fix this, use the model file from /system/etc when __ANDROID__ is defined, and refer to the current directory for all other cases. Test: m libinput_tests && $ANDROID_HOST_OUT/nativetest64/libinput_tests/libinput_tests Test: atest libinput_tests Test: atest --host libinput_tests Bug: 271134652 Change-Id: I0547ca9666eab153208a581fb60f6bef656b946a
-
- Mar 03, 2023
-
-
Siarhei Vishniakou authored
After further discussion about the potential usage of the MotionPredictor API, we decided that returning a List<MotionEvent> is inconvenient for the application. Update the native MotionPredictor to return a nullable MotionEvent instead. Bug: 167946763 Test: native Change-Id: Ib1382431d894b9561d9a9e2e96c360e2b7a19b5c
-
Prabir Pradhan authored
Bug: None Test: Upload Change-Id: I1500315dce96953763a67a942204b9c4f028e9ba
-
- Mar 02, 2023
-
-
Siarhei Vishniakou authored
This variable is left uninitialized. On some platforms, this causes the libinput_tests to fail when sanitizers are enabled. Bug: 251249010 Test: m libinput_tests && adb sync data && adb shell -t /data/nativetest64/libinput_tests/libinput_tests --gtest_filter="*keyCharacterMapParcelingTest*" Change-Id: I05063efdde9a826f7001dca828b84bbec5beb0df
-
- Feb 24, 2023
-
-
Alec Mouri authored
Devs should be able to determine if they can use an api just from reading the api docs. Bug: 270405876 Test: none Change-Id: I62df5447bc547be52f6b00fedf1006c8d66a5faf
-
- Feb 23, 2023
-
-
Prabir Pradhan authored
When logging evdev events, use the human-readable labels for recognized values for the event type, the event code, and event value. Bug: 193231132 Test: Manual, by enabling raw events logging: setprop log.tag.InputReaderRawEvents DEBUG Change-Id: I8ed700a1e2d8659031514d2d8f9aef420b129dbc
-
- Feb 22, 2023
-
-
Siarhei Vishniakou authored
Add an event verifier to check the touch streams that are being sent to the input channel. If a stream is inconsistent, crash. For now, only touch streams are being verified. Disable the feature while the bugs are being fixed. Bug: 267082966 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests Merged-In: Ibb8ab70b0019789c1a17dae0077be6b23d3d9139 Change-Id: Ibb8ab70b0019789c1a17dae0077be6b23d3d9139 (cherry picked from commit f06b672b)
-
- Feb 21, 2023
-
-
Zixuan Qu authored
Add VirtualInputDevice base class and a set of subclasses for each device type. Each virtual input device wraps a fd representing the uinput device and a set of write...event() methods. Most logic are moved from InputController JNI code: see ag/21294055 for reference. Test: atest VirtualInputTest VirtualMouseTest VirtualKeyboardTest VirtualTouchscreenTest VirtualDpadTest Bug: 267515782 Change-Id: Ie3a580acc890ac5af7461f012e05eb9ed3709a5f Merged-In: Ie3a580acc890ac5af7461f012e05eb9ed3709a5f
-
- Feb 14, 2023
-
-
John Reck authored
Bug: 241001465 Test: make / silkfx demo Change-Id: I043474aeda46a65ac93c124d854d71e1a8c082c9
-
- Feb 10, 2023
-
-
Philip Quinn authored
Bug: 267050081 Test: atest libinput_tests Change-Id: I09666da123a58786e8a6d47d4c29a475e92f2bbf
-
Philip Quinn authored
The buffers in the model file are used directly by TFLite, and so a small memory saving can be achieved by backing those memory pages with the file itself. Bug: 267050081 Test: atest libinput_tests Change-Id: I743a3c94477d4bb778b6e0c4b4890a44f4e19aa4
-
Philip Quinn authored
This allows us to only include the ops required to run the model and have the linker strip the rest out, reducing memory overhead. Bug: 267050081 Test: atest libinput_tests Change-Id: I4055a0c8971ed4308ccfa425ab5e5ba560deb58c
-