- Feb 10, 2023
-
-
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 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
-
- 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
-
- Jan 06, 2023
-
-
Philip Quinn authored
This field is set if a pointer's coordinate data were generated by input resampling and did not originate from the input device. Bug: 167946721 Test: atest libinput_tests Change-Id: I30d9aee85d462e6536fa33be5242365b52a11a6c
-
Siarhei Vishniakou authored
After further discussion with the graphics team, it turns out that the Choreographer isn't the best way to compute the prediction time. There may be some strategy that would use the Choreographer, like looking at the last vsync and trying to guess when the next drawing will occur. However, for now, let's just provide this time from the application and experiment with it. If we do need the Choreographer, we should be able to get this data from libgui here in the native layer, so we don't need the java to set this time, anyways. Bug: 167946763 Test: atest libinput_tests inputflinger_tests Change-Id: I496a9c184745d4cec085b880f913983cc2be9e3f
-
- Jan 04, 2023
-
-
Harry Cutts authored
The dispatcher still needs to be modified to only dispatch these to SysUI windows. Bug: 251196347 Test: check events received by a custom tester app, and touches shown by pointer location overlay Test: atest inputflinger_tests Change-Id: I3a7211d4a67e6388231bef158d3748c2e72e128d
-
Vaibhav Devmurari authored
Instead of passing country code to InputDevice.java, convert it to Language tag and Layout type on native side and pass that forward instead. We can later add support for HID language tag, that would give us better layout information than country code. This HID language tag is for Keyboard devices so, we set this country code derived language tag also for Keyboards only, even though country code could be specified for all types of devices. Moreover, we are using language tag and layout type for setting layout related info for Virtual keyboard devices too, making using country code redundant. Test: atest inputflinger_tests Bug: 259530132 Change-Id: I8eca5537a5bb44d0b8b056947cc317ac82a0901f
-
- Dec 22, 2022
-
-
Siarhei Vishniakou authored
The native MotionPredictor will call neural net code to create motion predictions for the provided gesture stream. In this CL, a simple linear extrapolation model is provided in order to test the API. To enable prediction: adb shell setprop persist.input.enable_motion_prediction true Bug: 167946763 Test: atest InputTests inputflinger_tests libinput_tests Change-Id: Id8a23b728aeb844288d5b8daae0829d61d4c1482
-
- Dec 21, 2022
-
-
Jean-Michel Trivi authored
Add event for playback activity event for format update. Add keys for each attribute of the format being communicated Bug: 263300713 Test: atest android.media.audio.cts.AudioPlaybackConfigurationTest Change-Id: Ib1dcc597e32ce4c451f4a42ae89587e3be416542
-
- Dec 17, 2022
-
-
Peiyong Lin authored
Bug: b/244216750 Test: atest PerformanceHintManagerTest Change-Id: I98f94a47caf94a9f9027f14ec01f5da531a20d35
-
- Dec 16, 2022
-
-
Prabir Pradhan authored
Rather than manually re-orienting the calculated angles for orientation and tilt, we use the transform to compute the oriented values for these non-planar axes. This approach is both less error-prone and less verbose. In this CL, we also transform the coverage rect from raw to display space using the computed transform. Bug: 236798672 Test: atest inputflinger_tests Change-Id: Ibfb6d2ab43e6fd7a63736ee7d9610c42be44affd
-
Zixuan Qu authored
The layout info consists of a BCP 47 conformant language tag and a layout type such as "qwerty" or "azerty". They will be used to initialize the input device. This is currently used by uinput virtual keyboard to pass in layout information. Bug: 237537306 Test: atest inputflinger_tests Change-Id: Icfc30f1afb0f88dd704d1d598d62a300a032b0f5
-
- Dec 14, 2022
-
-
Vaibhav Devmurari authored
This is a partial cherry-pick of cf875ab2 Bug: 262287992 Change-Id: I40c0b6f7d0e67ffc1ee01c6cb1dfbcfc96b37d62 Merged-In: I40c0b6f7d0e67ffc1ee01c6cb1dfbcfc96b37d62
-
Matt Buckley authored
* Convert PerformanceHintManager sendHint to a private API * Have HWUI depend on private implementation Bug: b/261640114 Test: atest PerformanceHintNativeTestCases Test: atest FrameworksCoreTests:android.os.PerformanceHintManagerTest Change-Id: I9d13f1eaff856dc3d38de5f6c1b5cf92a75f6ec3
-
- Dec 07, 2022
-
-
Sam Dubey authored
Revert "Remove duplicate ACTION_HOVER_MOVE" Revert submission 20414906-refactor hovering pointers Reason for revert: Part of DM+Platinum monitor efforts likely Likely causing b/261731836. This won't be submitted if proven otherwise. Reverted Changes: I3665d8e68:Remove duplicate ACTION_HOVER_MOVE I047926e53:Track hovering pointers explicitly Change-Id: I64b682558071661d79dca953d449251f79ee7004
-
Siarhei Vishniakou authored
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. Bug: 211379801 Test: m inputflinger_tests && adb sync data && adb shell -t /data/nativetest64/inputflinger_tests/inputflinger_tests Change-Id: I047926e53b846c96807aed45fb585e031e5b88b9
-
- Dec 06, 2022
-
-
Vaibhav Devmurari authored
Test: manual Bug: 261621522 Change-Id: I282eb4b2b29a4790e287371ac9408120ff32997d
-
Vaibhav Devmurari authored
For adding support for modifier key remapping, we need to add native support save key remappings and send appropriate android key codes using KeyCharacterMap. Test: atest KeyboardLayoutChangeTest Bug: 252812993 Change-Id: Ib3efa866c6e6408dd11e97dfaf49feb92f48bc18
-
- Dec 02, 2022
-
-
Leon Scroggins III authored
This class inherits from std::optional, which does not have a virtual destructor. As such, deleting an object of ftl::Optional using a pointer to its base class has undefined behavior. Prevent this by removing new from ftl::Optional. This is generally not the right way to use it anyway, and in fact this builds as is. Delete new[] while we're at it. This should be enough of a signal not to try to heap allocate these. It's still possible for a programmer to circumvent these deletions, but they prevent the straightforward (broken) use case. Bug: 261035092 Test: make Change-Id: Iafdaf98ed88920162af2b445caf0e4a69be51ab5
-
Michael Wright authored
Because it might have an invalid rotation it needs to return std::optional<ui::Rotation>, but at least we're using the types effectively here. Test: compiles Change-Id: I27076edcc6ce33594552863caa8ee643027a81e7
-
Michael Wright authored
ui::Rotation both provides better typesafety as well as some convenience functions (e.g. operator+, operator-). Test: atest TouchVideoFrame_test.cpp InputReader_test.cpp Change-Id: Ib423457c742ed3d41f2e3fc269ddf86809cbf247
-
- Nov 29, 2022
-
-
Devin Moore authored
If that is changed, the sensor_event_t type also needs to be changed. Test: na Bug: 259711109 Change-Id: I6b5413093634af325c41030cdf490deb6621e128
-
- Nov 22, 2022
-
-
Ady Abraham authored
Add comparison operators and tests for Optional Test: build Bug: 185536303 Change-Id: Ic2002489f5fa04cbb8b4c7aba57c8213b9719944
-
Dominik Laskowski authored
For now, allow mixing in construction, default construction, equality, ordering, incrementing, and addition. Bug: 185536303 Test: ftl_test Change-Id: I9017e124656ba0e7f13f378814c5b1c19a36655b
-