Age | Commit message (Collapse) | Author |
|
"revert-16371733-revert-16336498-revert-16306432-revert-16295572-ORWQJPYRMQ-IQBEBXXQNX-CARGQZNFNA-ZVFVBFSHNR"
* changes:
Reland^2 "Remove x/y offset from MotionEntry"
Reland^2 "Input injection: Assume transformed values are i..."
|
|
f7c99f3f2404f9605c2801caa20b236a595afa3d
Bug: 206842332
Change-Id: Id42790e6c1d562c61efb6673407a2861927df40b
|
|
Now, the 'nsecs_t' fields of this struct will no longer be falling on
4-byte boundaries. This prevents a hwasan crash.
Bug: 209991446
Test: atest inputflinger_tests
Change-Id: If28c7ff66b9495a3d61f590464d2b995afbe0c2b
|
|
"revert-16336498-revert-16306432-revert-16295572-ORWQJPYRMQ-IQBEBXXQNX-CARGQZNFNA"
* changes:
Revert "Reland "Input injection: Assume transformed values are i...""
Revert "Reland "Remove x/y offset from MotionEntry""
|
|
Revert submission 16336498-revert-16306432-revert-16295572-ORWQJPYRMQ-IQBEBXXQNX
Reason for revert: b/208849306
Reverted Changes:
I5afb6f7fd:Reland "Remove x/y offset from MotionEntry"
I68b5619bf:Reland "Input injection: Assume transformed values...
Change-Id: Id944e4eb39b26e3ffd51998b315a06e87a2af3d5
|
|
* changes:
Reland "Remove x/y offset from MotionEntry"
Reland "Input injection: Assume transformed values are i..."
|
|
Add an API to get the current rotation value of the transform of the
MotionEvent.
Bug: 207771136
Test: atest MotionEventTest
Change-Id: I05fb4455d0dcfc0de8c8564473ee8d43ac86c0bd
|
|
2b80b386c4ed5a1b3240da32080280b0a1ec9cef
Change-Id: I5afb6f7fd25cd13e42a9b4368fa387bf574e5ec0
|
|
259a2122aeafea0f20bfcc7c9bcd089511a5aa56
Bug: 188939842
Bug: 144544464
Bug: 206817973
Test: forrest run - CtsHardwareTestCases
Change-Id: I8f0312a502ec5c79038ef1697cf2d5b23db9fcfc
|
|
Revert submission 16295572
Reason for revert: DroidMonitor-triggered revert due to breakage bug http://b/207128427.
BUG: 207128427
Reverted Changes:
I65c284e5e:Input injection: Assume transformed values are in ...
Ifd359ebb0:Remove x/y offset from MotionEntry
Change-Id: Iab395d41d49db17c0a682bdd6c77fe2aacc004f4
|
|
Window or display offsets are now captured in the various transforms, so
we can remove the ability to specify the offset by itself.
Bug: 188939842
Test: presubmit
Test: atest inputflinger_tests
Change-Id: Ifd359ebb03850bb30efb358e84f0a7e77260a8b2
|
|
Revert submission 16194643-pointer-controller-in-display-space
Reason for revert: b/206817973
Reverted Changes:
I764c070ad:Change PointerController to display space
I5e9e19c36:Change PointerController to display space
Change-Id: If6e96f41873dd9601f49fc9f9f514a95394f3c58
|
|
PointerController used to work in the logical display space, so
TouchInputMapper and CursorInputMapper would need to transform the
coordinates before interacting with it.
This CL makes PointerController work in the display space. It will
transform incoming and outgoing coordinates to stay in the display
space using the DisplayInfo provided by SurfaceFlinger. Using info
provided by SF also means that there will be better synchonization
between the pointers and display changes like rotation.
Bug: 188939842
Bug: 144544464
Test: manual: ensure mouse and touch spots work in different display
orientations and sizes set using "adb shell wm size"
Change-Id: I764c070adef7e9f26c0062f1b3466c7115a305ac
|
|
|
|
Source for an input device may be composite. On some devices, the source
is specified as TOUCHSCREEN | STYLUS. That means a regular lookup of a
MotionRange using just SOURCE_TOUCHSCREEN fails.
Update the code to allow composite sources.
Also, improve the source dump by printing words instead of numbers.
Bug: 198472780
Test: adb shell dumpsys input
Change-Id: I8d395f2bb5a6db031e5c2aa6c1f5152ff067a2bb
|
|
Bug: 193718270
Test: atest inputflinger_tests
Test: atest libinput_tests
Test: atest FrameworksCoreTests
Test: atest CtsInputMethodTestCases
Test: atest CtsInputTestCases
Test: atest CtsSecurityTestCases
Test: atest CtsWindowManagerDeviceTestCases
Change-Id: I334c63d781ee8e8c13d21cc4a6cf323d885fc985
|
|
We would like to have all source and axis based transformations
calculated in the same place, which will be in the MotionEvent class.
This has the added benefit that MotionEvents created by developers
through MotionEvent.obtain() in Java will behave like motion events
generated from input devices in terms of how they're affected by
transformations.
Since axes from joysticks and touchpads should never be transfomred,
we previously solved this by using identity matrices for them in
InputDispatcher. Now, we move that logic to MotionEvent when applying
the transform.
Bug: 179274888
Test: atest libinput_test
Test: atest inputflinger_tests
Change-Id: Ic02466e01f2ba3131aca73bd10933ff81cb38cc9
|
|
Previously, the AXIS_ORIENTATION value reported by MotionEvent was
unaffected by the window transform. This meant that whatever value that
was generated by InputReader was the value reported to the window. This
meant that if the window was rotated or scaled respective to the logical
display and the window received an event, it could be the case that the
0 value no longer corresponds with the "up" direction of the window.
Now that the input pipeline works in the display panel's coordinate
system, we need the orientation value reported by MotionEvent to be
affected by the window transform.
This CL also refactors the shared logic by which transformed axis values
are calculated into a common function.
Bug: 179274888
Test: atest libinput_tests
Test: atest inputflinger_tests
Test: manual with test app and stylus
Change-Id: Ibb6f135de47f7c1cbde3c023931a760dfbe08e45
|
|
The values for axes X/Y that are stored in MotionEvent are
transformed to values used for its getRaw API based on the source.
This is because non-pointer sources should not have translation applied
to them.
We need to ensure that we use the same raw coordinates when we sign a
VerifiedMotionEvent in InputDispatcher that we would get with the
MotionEvent#getRaw API. To do this, we re-use the same logic used to
transform the raw coordinates in MotionEvent in InputDispatcher.
Bug: 179274888
Test: atest inputflinger_tests
Test: atest VerifyInputEventTest
Change-Id: I552f94064f15573ddda8f7c0b588cd3b984b6a94
|
|
Since input now works in display coordinates, we need to include the
display projection with MotionEvent so that the getRaw API can continue
to report logical display coordinates.
It is also important to highlight the difference in the coordinate
systems used by regular input windows and input monitors. MotionEvents
coming from input monitors will always report values in unrotated
logical display coordinates, because we do not yet have an API to report
unrotated values in MotionEvents.
Bug: 179274888
Test: presubmit
Test: manual, ensure input works
Change-Id: Ief3b2b31c6644beaa2f8c4b90302f441f93ab960
|
|
When the foreground window is gone, we should also cancel the touch
stream for its wallpaper window. We already cancel touch for the window
itself, and for global monitor.
Without this patch, the wallpaper window simply stops receiving touches,
and never gets CANCEL, either.
The behaviour is slightly strange for the global monitor in this case.
First of all, the global monitor receives CANCEL, which is questionable
(things like pointer location stop working). Also, it only gets cancel
when a *new* event comes in.
That said, it's probably fine, so let's just document this behaviour by
adding a test for it.
Bug: 192981537
Test: atest inputflinger_tests
Change-Id: I8a2ef7cd552acc5cf64b2e13a6df5d5988bd1808
|
|
Generalize compile-time and run-time lookup of enumerator names by
recognizing ftl_first and ftl_last to customize the range.
Add enum_range<E>() for iteration using range-based `for` loop.
Bug: 185536303
Test: Check assembly for small LUT in .rodata, and unrolled loops.
Test: ftl_test, libinput_tests, inputflinger_tests
Test: m libinputflinger
Change-Id: I0581611f4cfcf5837b0293867cb323742afb2c87
|
|
InputReader only processes configuration change from its main thread.
This means that if there is more than one Pointer Capture change
request when the thread is busy or sleeping, it will only process the
latest one. To ensure requests to enable Pointer Capture are synchronized
with Dispatcher, we must use sequence numbers.
Requests to enable Pointer Capture have a sequence number. Requests to
disable Pointer Capture do not have a value.
Bug: 195312888
Test: atest inputflinger_tests
Test: manual with GeforceNow app, see bug.
Change-Id: I6ae9c5498dc2f783b4c7211fa3665d42e29d2919
|
|
|
|
f854dad748
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15177988
Change-Id: I4715756a8369f7b8b7c00698cba480828eeb9128
|
|
This CL detaches the touch mode state update from focus update. It does
that by introducing a new internal event (TouchModeEvent). This CL also
adds this event to InputChannel and related processing logic to
InputPublisher and InputConsumer. InputDispatcher will process two
different events now: FocusEvent when gaining/losing focus and
TouchModeEvent when entering/leaving touch mode.
Test: atest libinput_tests
Bug: 193718270
Change-Id: Ie4e5b6e8e798f12d7203127b4559fa40d38788de
|
|
This is exclusively used for getRaw compatibility. The input
transform can include window rotation and also, apparently,
nested view rotations as it the events get mutated by ui-toolkit.
Bug: 187686656
Test: cd frameworks/native/services/inputflinger && atest
Change-Id: I2fd7a2b2acbe422d962d0646d41c60eb48160620
|
|
into sc-dev am: 199ca20ef4 am: c77cf4d087
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15215271
Change-Id: I3af369e7d59295e38b42ff1fd1cecac1167b3711
|
|
into sc-dev am: 199ca20ef4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15215271
Change-Id: I2e468854742a154f04b476e7a86bbd3343ef93dc
|
|
Remove semicolon as there are more enum elements.
Bug: 192643379
Test: build for non-linux host
Change-Id: Ia9e90f382d50ec52f0bad9c186031fd7ca29053a
|
|
8f5d73a62a am: 1d8759d3ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15175856
Change-Id: I2e2ca25c365284cb47238988eef8f3f016916868
|
|
8f5d73a62a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15175856
Change-Id: If03ba00992ed22420e1642d8f57d334376cdb7bf
|
|
Remove semicolon as there are more enum elements.
Bug: 192643379
Test: build for non-linux host
Change-Id: Id1f622180d7c567d68cb9997317d14868453395b
|
|
accessibility" into sc-dev am: 61cfde719b am: 1e15906653
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15019654
Change-Id: Iba2cea16c808097d222538bfb52e193bfb5759b0
|
|
accessibility" into sc-dev am: 61cfde719b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15019654
Change-Id: I8dae253b5b0a54beb9696d3e6e2395be6b3a08e6
|
|
If an input event was modified or injected by accessibility, set the
appropriate flag. This helps applications distinguish the real hardware
events from synthesized events.
This also allows a11y services more flexibility in modifying the event
streams coming from real hardware.
Bug: 152399927
Bug: 175069843
Test: atest inputflinger_tests libinput_tests
Change-Id: I805cba4c84582fa4cd4e0892ec00428d4b255ec6
|
|
In preparation for the hierarchy listener interface, moved the
InputWindow structs into libgui and have libinput dependant on libgui.
Also renamed InputWindow to exclude Input since it will be used for more
generic purposes.
Test: Builds and flashes
Bug: 188792659
Change-Id: I24262cbc14d409c00273de0024a672394a959e5f
Merged-In: I24262cbc14d409c00273de0024a672394a959e5f
|
|
In preparation for the hierarchy listener interface, moved the
InputWindow structs into libgui and have libinput dependant on libgui.
Also renamed InputWindow to exclude Input since it will be used for more
generic purposes.
Test: Builds and flashes
Bug: 188792659
Change-Id: I24262cbc14d409c00273de0024a672394a959e5f
|
|
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14994078
Change-Id: Ie365b72de628cdddc3b851b8ad9bc149149c1d62
|
|
We do not have libbinder on mac, so that rules out using aidl files for
mac builds. To unbreak sdk_mac build targets, just use constant values
directly on mac instead of trying to use IInputConstants.
Bug: 152399927
Test: forrest
Change-Id: I21697ec02dbb215edd89d2f6849c9147f490af99
|
|
sc-dev am: 9473f5563a am: 5210e8e564
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14673429
Change-Id: I681ba7105fa4d88edb972cb77fe94f64e16ea96a
|
|
|
|
am: 0d1e6c8331 am: 5f07e97c2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14847816
Change-Id: I8c25030bd75d3b2cab8ae07ca30e4b9a757cd4de
|
|
Refactor InputReaderInterface to return a copy instead of pointer. This
will ensure that we don't read from memory that's been freed.
Also, refactor InputDevice api's to return a list of infos instead of
having to query each individually. In all usages so far, there's no need
to get a specific info by type.
Bug: 190126442
Test: atest inputflinger_tests libinput_tests
Change-Id: I7f993a14259bb802e2631663c1c8bb65cc9b6702
|
|
If an event is a trusted event coming from accessibility, then allow the
device id that's provided in the InputEvent to be used during injection.
That means, events injected from accessibility will not always have
device id == -1 (VIRTUAL_DEVICE_ID).
The only exception are the events coming from external accessibility
services (MotionEventInjector). For simplicity, we mark all of those
events as untrusted.
The flow is as follows:
1. When a11y is enabled, mInputFilterEnabled is set in InputDispatcher
2. Every event processed by dispatcher is first sent to InputFilter (===
accessibility).
3. The event from dispatcher sent to a11y has new flag,
POLICY_FLAG_ACCESSIBILITY_TRUSTED.
4. By default, a11y passes all the policy flags back to inputdispatcher
when it tries to reinject the event.
5. If a11y hits a path where untrusted events may be injected, it
removes the FLAG_A11Y_TRUSTED from the policyFlags and continues the
event handling.
6. Eventually, if a11y does not handle the input event, it sends it back
to InputDispatcher using 'injectInputEvent(..., policyFlags)'.
7. InputDispatcher will look at the policyFlags of the injected event.
If the new flag is present, InputDispatcher will create EventEntry with
the provided device id. Otherwise, it will create EventEntry with the
virtual device id (-1).
8. The events received by the apps will now have the original device id
if a11y is enabled.
Test: atest CtsInputTestCases:android.input.cts.GamepadWithAccessibilityTest
Test: atest VerifyInputEventTest
Bug: 175069843
Change-Id: Ie6399654f4434fdc8232e50373b6277d2f43a864
|
|
3a7faf308a am: cc454264f0 am: ccf806b97f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14597492
Change-Id: Id88888f8e1a7b0af1e49a663bdc13e2f2d31d61a
|
|
|
|
f32251f986 am: 5663acef80
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14058367
Change-Id: I93abcd11fd4a579ade54141151f7f8218daf2776
|
|
Currently, InputDispatcher is sending touch event information to
westworld. We will now be transitioning to new atoms that have better
coverage and statistical significance.
In this intermediate CL, we remove the LatencyStatistics so that we can
replace it with something better in the upcoming CLs.
Bug: 167947340
Test: m libinput_tests inputflinger_tests
Change-Id: I8fcb846321245011c3b6e6f896b99b8d9037a2a4
|
|
Change native lights type to match java API light types.
Bug: 181743615
Test: atest InputDeviceLightsManagerTest, atest LightsManagerTest, atest android.hardware.input.cts.tests
Change-Id: I45fe0489fdc070bb4057f4bea061f0cbeacad0de
|