56c9ae1d334534c2f4c2857ea4b6d09feef50075 |
|
07-Nov-2017 |
Siarhei Vishniakou <svv@google.com> |
Fix resampling for multiple pointers If more than one pointer is present and identical coordinates are encountered for any pointer, the lastResample value will not be invalidated (by clearing its bits). As a result, the same lastResample value will be used to subsequently rewriteMessage any time in the future. This can cause significant jumps in the pointer coordinates, and is a bug. To further clarify, this bug has only to do with resampling and nothing to do with both pointers having the same X or Y value. This CL makes this logic to be per-pointer. As soon as non-identical value is encountered and the timing conditions are such that the resampled value is not needed to be used, the lastResample bit for that pointer will be cleared, meaning that the value in lastResample for this pointer is stale. This value will no longer be used anywhere. When performing resampling, allow the process to happen on a per-pointer basis. If one of the pointers has encountered events with identical coordinates, then use the previously resampled value (do not resample again), if that value is still valid (see above). Otherwise, the normal resampling path will be taken. On the other pointers that do not have identical coordinates, go through the normal path as well. Bug: 68840121 Test: recorded a repro event with inputstudio and replayed it while observing the screen. Saw that the coordinates jump before the fix, and do not jump with the fix. Change-Id: If43c323759de8f0184b76221d1ae599a75349ce9
/frameworks/native/include/input/InputTransport.h
|
f93fcf4c403fa4181536821680d495824a4290c5 |
|
23-Nov-2017 |
Siarhei Vishniakou <svv@google.com> |
Prefer std::string over String8 String8 is obsolete, only use std::string in the input libraries now. Bug: 64258224 Test: make Change-Id: I958b6b281d969138f39cc26825c877a24bc4a853
/frameworks/native/include/input/InputTransport.h
|
635cb71a65d361ec107afeafcb49488f6812f7d1 |
|
02-Nov-2017 |
Siarhei Vishniakou <svv@google.com> |
Fix broken input tests InputPublisherAndConsumer_test currently segfaults due to null pointer dereference. This is because 0 is passed instead of a valid pointer to an allocated int32_t. Also, enforce strict compiler warnings, include signed comparisons. Bug: 62033391 Test: m -j libinput_tests_InputEvent_test libinput_tests_InputChannel_test libinput_tests_InputPublisherAndConsumer_test libinput_tests_InputTransport_test libinput_tests_VelocityTracker_test && adb push out/target/product/taimen/data/nativetest/libinput_tests/ /data/nativetest/ then run the above tests individually, for example /data/nativetest/libinput_tests # ./InputPublisherAndConsumer_test and others in a similar manner Change-Id: Ia030cdbfa22d2bf7bdf6274a337b059ca3f9a6c3
/frameworks/native/include/input/InputTransport.h
|
c7dc3784a3302b74b895c2e8318adc62b3a0db4d |
|
25-Aug-2017 |
Siarhei Vishniakou <svv@google.com> |
Ensure history has pointer id of interest. When two events with different pointer id's end up next to each other in touch history, then crash may occur by trying to access the data associated with the second to last pointer id by using the last event's pointer id. Test: monkey testing on sailfish Command: adb shell monkey -p com.google.android.deskclock -p com.android.calculator2 -p com.google.android.contacts -p com.android.launcher -p com.google.android.launcher -p com.android.mms -p com.google.android.apps.messaging -p com.android.phone -p com.google.android.dialer -p com.android.providers.downloads.ui -p com.android.settings -p com.google.android.calendar -p com.google.android.GoogleCamera -p com.google.android.apps.photos -p com.google.android.gms -p com.google.android.setupwizard -p com.google.android.googlequicksearchbox -p com.google.android.packageinstaller -p com.google.android.apps.nexuslauncher -c android.intent.category.LAUNCHER --ignore-security-exceptions --monitor-native-crashes -s 611 -v -v -v 125000 Native tests will be added later. Fixes: 65012433 Change-Id: I560a54d7f59a8892adfad3a54db9c436e4089343
/frameworks/native/include/input/InputTransport.h
|
086a02a25f4e24be436411d7cbe86307ae0a6ad7 |
|
12-Jun-2017 |
Siarhei Vishniakou <svv@google.com> |
Fix resampling logic for duplicate events. When events with identical coordinates are reported by the input driver, resampling can lead to false change of direction due to extrapolation. The added logic will compare the current event to the previous event, and will use the previously resampled values for the new event if the raw (as reported by the driver) coordinates of the two events match. This commit makes events with identical coordinates possible, so it must be submitted together with the new impulse-based VelocityTracker strategy commit. The currently used 2nd degree polynomical unweighted least squares strategy cannot handle consecutive events with identical coordinates. Bug: 35412046 Test: Recorded bad scroll event on swordfish, and replayed the event to reproduce this bug. To twitch is no longer observed. Also tested common usecase scenarios on sailfish, no regressions observed. Change-Id: Icb5cf6c76959f3514b8b94c09e38cc5434f31b23 (cherry picked from commit 0aeec07971d86c635412c672bd69d91f589a0cd9) Merged-In: Icb5cf6c76959f3514b8b94c09e38cc5434f31b23
/frameworks/native/include/input/InputTransport.h
|
58641508af4e3d3f553ff7e73304866755cfbd5b |
|
31-Jul-2017 |
Tarandeep Singh <tarandeep@google.com> |
Add displayId in InputDispatcher, InputTransport Bug: 62033391 Test: make StructLayout_test make libinput_tests_InputEvent_test make libinput_tests_InputPublisherAndConsumer_test Run tests under /data/nativetest64/libinput_tests/ Change-Id: Id02cab83924d399eae0c1c233dc545fbb64945c2
/frameworks/native/include/input/InputTransport.h
|
b03f103fd40d9028731a81e87a817a3e3bd07fa4 |
|
14-May-2015 |
Michael Wright <michaelwr@google.com> |
Fix input tests to work with new MotionEvent member Change-Id: I0dde0f91f693903f26edc116b5dbcbf33bac2b93
/frameworks/native/include/input/InputTransport.h
|
7b159c9a4f589da7fdab7c16f3aefea25e0e7e4f |
|
14-May-2015 |
Michael Wright <michaelwr@google.com> |
Revert "Revert "Add new MotionEvent actions for button press and release."" This reverts commit 70b41ef580644fd0fe6fa9b8ac7e4a745cfb6db3.
/frameworks/native/include/input/InputTransport.h
|
70b41ef580644fd0fe6fa9b8ac7e4a745cfb6db3 |
|
14-May-2015 |
Michael Wright <michaelwr@google.com> |
Revert "Add new MotionEvent actions for button press and release." This reverts commit 48a8a0e4322969e1551536d6183af3a1faa2240b.
/frameworks/native/include/input/InputTransport.h
|
48a8a0e4322969e1551536d6183af3a1faa2240b |
|
11-May-2015 |
Michael Wright <michaelwr@google.com> |
Add new MotionEvent actions for button press and release. Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to signal a button press or release. If these actions happen simulanteously with a DOWN or UP event then they're explicitly ordered to happen after the DOWN or preceding the UP in order to send them to the most recently targeted view. Also, introduce new stylus button constants that differ from the constants we use for mouse buttons. Bug: 20704355 Change-Id: Ib960a5004db5429ad2fc8db020704773e2978327
/frameworks/native/include/input/InputTransport.h
|
83e0e425c61c4e03f61114a88f117db1553cd44c |
|
23-May-2014 |
Fengwei Yin <fengwei.yin@intel.com> |
x86_64: Align uint64_t/int64_t structure member to 8 bytes To make sure the stature which pass between 32/64bit process have same memory layout for 32/64bit. Signed-off-by: Fengwei Yin <fengwei.yin@intel.com> Co-Authored-by: Narayan Kamath <narayan@google.com> (Unit test only.) Change-Id: I1bc2d12cce41ec0bc484adcaf968f274bec75c12
/frameworks/native/include/input/InputTransport.h
|
ed5fd384b7401fbb6143eb7107cbfe9af46116be |
|
02-May-2014 |
Narayan Kamath <narayan@google.com> |
Change InputMessage.motion.pointerSize to a uint32_t. This ensures it's the same size in both 32 and 64 bit processes and also brings it in line with struct MotionEntry. (cherry-picked from bc6001b026069714177526eb1120b0011d6f2a51) Change-Id: I28e87050478920a54132efbbb8138076ebad1409
/frameworks/native/include/input/InputTransport.h
|
5912f95d26f77d2b6df13e1f2672e48e3f9b871c |
|
02-Jul-2013 |
Jeff Brown <jeffbrown@google.com> |
Move input library code from frameworks/base. Change-Id: I4983db61b53e28479fc90d9211fafff68f7f49a6
/frameworks/native/include/input/InputTransport.h
|