- 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
-
- Feb 07, 2023
-
-
Matt Buckley authored
Revert submission 21161765-sessionhint_api Reason for revert: this broke the main-finalization-1 build... somehow. see b/268111957 Reverted changes: /q/submissionid:21161765-sessionhint_api Change-Id: I2a8b6609729bba06fc9409f4583886915c82577c
-
- Feb 06, 2023
-
-
Philip Quinn authored
Bug: 167946763 Test: atest libinput_tests Change-Id: I7e50d38ed0c593aebc5fdc6af4b25868505d48bc
-
- Feb 02, 2023
-
-
Seunghwan Choi authored
Let PointerController (MouseCursorController) know the source of the current event, either mouse or stylus. MouseCursorController will show the proper default pointer for the active source, if the requested pointer type is TYPE_NOT_SPECIFIED. Test: Manual Test Bug: b/215436642 Change-Id: I91f702db661846fc7ad857f71656903c8aa4334a
-
- Feb 01, 2023
-
-
Rachel Lee authored
The API to get a native attached choreographer from ASurfaceControl. Bug: 255838011 Test: atest GraphicsTest Test: atest ChoreographerNativeTest (test no regression) Change-Id: I5db99d8888fd2adbc4a8fc2ce9a7c07f4de146ee
-
- Jan 31, 2023
-
-
Matt Buckley authored
Change NDK to use "SessionHint" enum consistently across definitions. Bug: 266596626 Test: manual Change-Id: I6ad095655b2dc05daf95cb5e7f506b3725915596
-
- Jan 26, 2023
-
-
Philip Quinn authored
This model generates probabilistic motion predictions based on a sequence of relative input movements. The input movements are converted into polar coordinates (distance and angle) based on an axis that follows the current path. This ensures that the orientation of the device and of the inputs do not affect the predictions. The orientation of the input device is also transformed to be relative to the path axis. The test cases verifying model efficacy are consolidated into CTS. Bug: 167946763 Test: atest libinput_tests PiperOrigin-RevId: 492068340 Change-Id: Icd8d90bd5a7ce79c699bfdb6367a4cbd8130441a
-
Peiyong Lin authored
Bug: b/266595015 Test: atest PerformanceHintManagerTest Change-Id: I33755bb30cceb9953db293092e417a1a14288226
-
- Jan 24, 2023
-
-
Siarhei Vishniakou authored
Before this CL, a number of checks for kl file validity were incorrect. Some of the APIs were supposed to return an invalid value, but instead were always returning a valid value, no matter what the input was. Correct these values by switching to std::optional. Bug: 266400536 Test: m libinput_tests && adb sync data && adb shell -t /data/nativetest64/libinput_tests/libinput_tests Change-Id: I4ef45f3249dca4f4f033fb85e9fecbc2ad1f1395
-
- Jan 23, 2023
-
-
Siarhei Vishniakou authored
It's useful sometimes to print out the events produced by the dispatcher. In this CL: - Switch (partially) to the C++-style prints from android-base - Add a way to print keyevents, motionevent into a stream - Add InputEventInjectionResult print Also, improve the debug prints for outgoing events. When an entry is getting dispatched, the dispatcher may modify its action, among other variables. With this CL, this will be observable in the logs. Bug: 211379801 Test: atest AccessibilityEndToEndTest Change-Id: I221161af7903ae4da77733265c67a426a3e5b557
-
- Jan 20, 2023
-
-
Harry Cutts authored
This dumps the state from the gesture converter, and a list of gesture properties, which is useful for debugging settings. Bug: 251196347 Test: run dumpsys input with touchpad connected, check output Change-Id: I036d0251b06489b645b883a239ff345a98448497
-
- Jan 19, 2023
-
-
Siarhei Vishniakou authored
Update: Compared to the first version of this CL that got reverted, this version also adds Flags::FOREGROUND to the windows whenever appropriate. Before this CL, hovering window was tracked separately inside InputDispatcher. This window was getting updated in various places. Inconsistent motion streams, like HOVER_ENTER->DOWN->UP->HOVER_EXIT were possible. In this CL, we track hovering pointers inside TouchedWindow. At all times, the currently tracked pointer must always be in the touch state. The hovering pointer is removed when HOVER_EXIT is received. This CL also establishes the foundation for multi-device, multi-pointer streams, by storing hovering pointers inside TouchedWindow per-device. Eventually, we can look into separately creating touched targets from updating the touch state. This approach is partially used in this CL. TouchState is used to keep track of where the hovering pointer is currently. The 'addHoveringWindowsLocked' function returns the equivalent of InputTargets. Eventually, we can change this to return InputTargets. 39d37cfb Bug: 211379801 Test: atest android.accessibilityservice.cts.AccessibilityEndToEndTest Test: atest VirtualMouseTest Test: m inputflinger_tests && adb sync data && adb shell -t /data/nativetest64/inputflinger_tests/inputflinger_tests Change-Id: I0aa77bc9f680786b154312c4c936da2cf6efffa1
-
- Jan 17, 2023
-
-
Prabir Pradhan authored
The InputManager#getHostUsiVersion(displayId) API can be used to tell if a display supports the Universal Stylus Initiative protocol for styluses, and can be used to address version compatibility issues. We first dynamically attempt to find an InputDevice associated with the display that supports USI. If there are none, we check the statically add USI version for the display in config_displayUsiVersionArray. Checking the config as a fallback means the USI InputDevice does not have be registered/open perpetually for the getHostUsiVersion() API to return the correct values. Bug: 261596890 Test: manual with device Test: atest TouchScreenTest Change-Id: Ifabd00aa996ba88258d8112e5de3582adaf27629
-
- Jan 13, 2023
-
-
Seunghwan Choi authored
Add TYPE_HANDWRITING index on native input.h to use on inputManagerService.cpp Test: Manual Test(hover pointer on handwriting area) Bug: b/215436642 Change-Id: I41caec44d81c414b4acc1e3575c5acc6f99146d8
-
Siarhei Vishniakou authored
We would like to skip resampled data in VelocityTracker when the velocity is being computed. To make this happen, we need to first process the data per-pointer. This will then allow us to skip individual data points. To minimize the impact to older VT strategies that are largely untested, the main change here is to make 'mMovements' and 'mIndex' become per-pointer, rather than converting to a vector. Also, use std::array instead of [] because [] cannot be used inside a std::map easily. There should be no functional change in this CL. The actual skipping of resampled values will be done in a separate CL. Bug: 167946721 Test: m libinput_tests && $ANDROID_HOST_OUT/nativetest64/libinput_tests/libinput_tests Change-Id: I1c3c845bca0d4bb7d2c3973bfe84462139ac36f3
-
- Jan 12, 2023
-
-
Vaibhav Devmurari authored
Need to allow resetting of key character map by setting overlay map to null. This is required when moving from a IME setting that has a KCM to another IME setting that has none. Test: atest KeyboardLayoutChangeTest Bug: 20805588 Change-Id: I62dc65970b61628486aff698a8ab8ccb31c109d6
-
Siarhei Vishniakou authored
The active pointer id is not always valid. Rather than using a magic value for it (-1), let's use std::optional. Some other fixes: - convert to enum class, for better type safety / switch checking - ident switch statements It's necessary to ident switch statements to avoid weird clang-format problems when changing code that follows those sections. Bug: 167946721 Test: m libinput_tests && $ANDROID_HOST_OUT/nativetest64/libinput_tests/libinput_tests Change-Id: I6b78301e2c1d2fba1a789fa9491f7d6ab8b37d02
-
- Jan 10, 2023
-
-
Yurii Zubrytskyi authored
Bug: 237579711 Test: UTs + build + boot Change-Id: Ie94a626e8c92aecc0180cf71e965c905ae9f1f8d
-
- Jan 09, 2023
-
-
Harry Cutts authored
Bug: 251196347 Test: check events received by a custom tester app, and touches shown by pointer location overlay Test: atest inputflinger_tests Change-Id: I249ca6208091e3c4291c5be68c77339bf5f69a5b
-
Harry Cutts authored
Bug: 251196347 Test: try out two-finger scroll gestures with an Apple Magic Trackpad 2 Test: atest inputflinger_tests Change-Id: I9e693350873b90bd50605ab348821224ae1121a8
-