| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| | |
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2975191
Change-Id: Id5125ec34cdd7e0cdbb203a848f9e8dbb12afb7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
| | |\
| | |
| | |
| | |
| | |
| | |
| | | |
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2975191
Change-Id: I40c96483da7c1182050d5d3845c9656a28ccb74c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
libinput checks input_device.config_file.apex sysprop when loading input
config.
This removes hard-coded apex name (com.android.input.config).
Bug: 315080500
Test: adb shell dumpsys input
# set "touch.orientationAware = 0" in Touchscreen_0.idc
# build/install the input config apex
# Observe the Input configuration
# "Touch Input Mapper" shows "OrientationAware: false"
Change-Id: I4e0415f26397f4ec4d77ee1d1909da47a04b986a
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is needed to upgrade the android_logger crate from 0.12.0
to 0.13.3.
with_max_level provides the same functionality as with_min_level.
The renaming is admittedly confusing, but the new name is accurate
and it makes sense that they deprecated and then removed the
previously poorly named with_min_level.
See crate documentation [1] and code [2].
[1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level
[2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227
Bug: 322718401
Test: build and run CF with the change.
Test: m aosp_cf_x86_64_phone
Change-Id: I2e4ed99253f3b328a98d4bc5988beda7304612e6
Merged-In: I2e4ed99253f3b328a98d4bc5988beda7304612e6
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is needed to upgrade the android_logger crate from 0.12.0
to 0.13.3.
with_max_level provides the same functionality as with_min_level.
The renaming is admittedly confusing, but the new name is accurate
and it makes sense that they deprecated and then removed the
previously poorly named with_min_level.
See crate documentation [1] and code [2].
[1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level
[2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227
Bug: 322718401
Test: build and run CF with the change.
Test: m aosp_cf_x86_64_phone
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:046a3cc5a18d2b2cb3e52674917ad0d1f326ef8d)
Merged-In: I2e4ed99253f3b328a98d4bc5988beda7304612e6
Change-Id: I2e4ed99253f3b328a98d4bc5988beda7304612e6
CP ag/26066505 to resolve merge conflict of aosp/26066505
|
| | |\ \
| | |/
| |/|
| | |
| | |
| | | |
Bug: 319669529
Merged-In: I264e728c49f0500f2f868c3a25b0910d0d527340
Change-Id: I0de5ae0000a29e4b9735e6c4f381f680eb0723cd
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We'd like to limit the direct usage of libvintf.
Bug: 270169217
Test: atest libinput_tests
Merged-In: I7630116345e1db736a8173467fc865cea6ec4e96
Change-Id: I7630116345e1db736a8173467fc865cea6ec4e96
(cherry picked from commit 29db97cfa1e3347dc94db36fbba76384eed7f9aa)
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't yet have a way to determine if a device can actually report a
usage code. Adding a flag to mark usage code as fallback only mapping.
Bug: 297094448
Bug: 317838112
Test: atest inputflinger_tests
Change-Id: I137113d0dc9a1c8abf523b96942486be176d0240
Merged-In: I137113d0dc9a1c8abf523b96942486be176d0240
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, the only way to stop a fling (the scrolling that occurs due
to "momentum" after you've finished a two-finger swipe on the touchpad)
is to put two fingers down again and move them slightly. This is an
awkward gesture, compared to most platforms where you just touch the pad
again and scrolling stops.
The trouble is that there is currently no API by which we can tell apps
to stop a fling. Instead, make a fake finger at the current cursor
location, then immediately cancel it. This stops flings without side
effects (e.g. activating UI elements, inking in drawing apps, moving the
insertion point in text fields, etc.) in every app I've tried it in [0],
except for a number of issues in Google Docs, Sheets, and Slides (both
the Android apps and when opened in Chrome). We'll have to talk to the
relevant teams about this. Follow-up CLs will make an API change to make
it easier to distinguish these fling stops from actual clicks.
[0]: Calendar, Chrome [1, 2], Docs, Files, Firefox Beta [1, 2], Gmail,
Google, Keep, Maps, News, Photos, Play Store, Podcasts, Settings,
Sheets, Slides, Word, YouTube
[1]: https://www.longestjokeintheworld.com/
[2]: https://codepen.io/caraya/embed/ZyQMWd
Bug: 281106755
Test: start flings in a number of apps [0], touch the touchpad, and
check that the fling stops without causing other side effects
Change-Id: Ie8504dc047ee23b5524d5372f65adfaa75a76cd8
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* changes:
InputDispatcher_test: Verify all traced events match exactly
InputDispatcher_test: Consume all moves to prevent events from batching
InputDispatcher: Create new EventEntries for events with zero-ed coords
InputDispatcher: Improve pointer transform mapping in InputTarget
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: 210460522
Test: atest inputflinger_tests
Change-Id: I2ab660ed0a6888c23bc711fb8494385c22b3c404
|
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since window focus requests are not fully synchronized between
InputDispatcher and WM, there can be adverse impacts of rapid gesture
transfers on the focused window. This is because when transferring
touch, we synthesize a pointer DOWN, and if that event id directed to a
non-focused window, Dispatcher will notify the policy that
onPointerDownOutsideFocus to get WM to change the focused window.
We want the concepts of touched windows and focused windows to be
orthogonal. To support this, change the behavior of the transferTouch
API to ensure that transfering touches don't result in changes in focus.
Bug: 324265767
Test: atest inputflinger_tests
Change-Id: I07607c6ac6c91a1a5ad4433b451aa8dfb23f42a7
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Please see go/aconfig-flag-containers for more context
Test: m
Bug: 312769710
Change-Id: Ibe1f32691a2fb10a267b580766abcde621a596ff
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This gets us closer to the goal of storing unique_ptr of InputChannel
inside the InputPublisher.
In this CL, we are still allowing the "copy" and "dup" functions to
exist. Removing those requires significant refactoring on the Java side,
including the jni layer and object ownership models.
Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Bug: 161009324
Change-Id: If6f44d78c7fc9f3e12729068de1753847abf0ebb
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change creates a struct within InputDeviceInfo to hold View related
behaviors of an input device. Currently, a single behavior is supported:
device.viewBehavior_smoothScroll. This can be specified in an IDC file
to hint clients of the InputDevice that they should animate scrolls for
motion events generated by the InputDevice.
Bug: 246946631
Test: add property in IDC, check API returns expected value
Test: atest frameworks/native/services/inputflinger/tests/InputReader_test.cpp
Change-Id: Ibe373cadc40d2a08116e787b744dd30812638edb
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
...to make it more readable while debugging, since it's a 32-bit random
number.
Bug: 210460522
Test: None
Change-Id: I223071a2d4c671c2cc91a49dd049c481ce4a2319
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is needed to upgrade the android_logger crate from 0.12.0
to 0.13.3.
with_max_level provides the same functionality as with_min_level.
The renaming is admittedly confusing, but the new name is accurate
and it makes sense that they deprecated and then removed the
previously poorly named with_min_level.
See crate documentation [1] and code [2].
[1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level
[2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227
Bug: 322718401
Test: build and run CF with the change.
Test: m aosp_cf_x86_64_phone
Change-Id: I2e4ed99253f3b328a98d4bc5988beda7304612e6
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* changes:
InputTracer: Trace an event being dispatched to a window
InputTracer: Trace motion and key events
InputTracer: Add custom key and motion event types for tracing
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: 210460522
Test: manual with perfetto
Change-Id: I4bcac0b8bba5132d0e68815923ab8f89b2bede84
|
| |\ \ \ \ |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, InputChannel is a manually-written parcelable. In this CL, we
introduce an aidl-defined InputChannel, which eventually could also be
used in Java as well.
Now, whenever an InputChannel needs to be written to parcel, we first
create the new android.os.InputChannel and then write that object to
parcel.
Eventually, we can convert the Java side of InputChannel to use this
mechanism, as well.
Bug: 161009324
Test: adb shell monkey 1000
Test: atest libgui_test
Change-Id: Ib44c5ff02b3c77e0425b59a76195ed100e187317
|
| |/ / /
| | |
| | |
| | |
| | |
| | | |
Bug: 315307777
Test: manual
Change-Id: I737a7418f43afac4735bb1a5523713890f4df553
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This rate limiting used to exist in PowerManager's JNI entry point.
Moving it to InputDispatcher helps us avoid building and sending the
request to the PowerManager JNI layer if the request is not going to be
sent to the Java layer.
We are also enabling configuration of this rate. Previously, a default
rate of 100ms per use-activity type was used. We have added an XML
config to allow overriding this value device-wide, for all user-activity
types. This helps devices adjust the rate as per their use cases.
Bug: 320499729
Test: atest InputDispatcherUserActivityPokeTests
Change-Id: I66fce1082e857b4d74b69e2d87d1a5fe1d9eb57c
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This code has already been disabled, and now we can remove it.
Bug: 312714754
Test: atest inputflinger_tests
Change-Id: Ie02687b770586b09c180f29adc0330981808e92d
|
| |\ \ \ \
| |/ / /
|/| | |
| | | | |
EndToEndNativeInputTest" into main
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The EndToEndNativeInputTest::waitForEventAvailable(timeoutMs) is similar
in implementation to InputChannel::probablyHasInput(), but can stop
after a timeout.
Add InputChannel::waitForMessage(std::chrono::milliseconds timeout) for
use in tests and use it to replace the waitForEventAvailable().
The difference of the new method from probablyHasInput() is that the
latter does not get repeated (because it is not necessary to implement
the hint). Repeating happens only on EINTR to allow tests to return
before timeout expiration when there are problems with the channel
setup. In the end the implementations are rather different.
Bug: b/314973388
Test: atest frameworks/native/libs/gui/tests/EndToEndNativeInputTest.cpp
Test: atest InputPublisherAndConsumerTest
Change-Id: I806aad14e4fba223a5cbbe49cea862f9b8279f24
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Loading kernel configs is needed when the specified layout has
"requires_kernel_config".
Otherwise, we don't need to load kernel configs.
Bug: 320198280
Test: presubmit
Change-Id: I7955d65d804ed4965235a1649c5f5f53996f4d3b
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The new touchpad mapper implemented in Android 14 replaced our simple
cursor movement acceleration curves (where the acceleration factor
increased linearly with speed between minimum and maximum values) with
more sophisticated multi-segment curves. However, cursor movement using
mice remained on the old curves. For consistency and to improve pointing
accuracy, use the same curves for mice, too.
This is also a good opportunity to improve the documentation comments
and naming now that I've wrapped my head around the maths a bit better.
Bug: 315313622
Test: atest inputflinger_tests
Test: check pointer movement with a mouse, including changing the
pointer speed setting and checking that the movement speed changes
Change-Id: Ifcf43f4de6017f06b66f37d5e03a13cc257d92d5
|
| | |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This should help figure out / confirm whether there are bugs in the
application input event consumption code.
In this trace, we are adding app-process "InputConsumer processing" tag,
with the cookie = sequence number of the input event.
In this context, input events include everything, like key events,
motion events, focus events, etc. In other words, anything that's being
sent from the InputDispatcher to the receiving window.
When the "finish" is finally successfully written into the fd, we end
the trace.
Therefore, in cases of batching, we would see a few of these events pile
up, until we finally produce a frame that captures all of them.
It would also be interesting to add some app-side benchmarks for this.
We currently collect those in
https://pitot-autopush.corp.google.com/metric_index/Touch%20latency
but they are not broken down by the application.
Test procedure:
1. Add "system tracing" to quick settings from developer options (enable
the quick settings tile for system tracing)
2. Start system tracing via UI of quick settings
3. Open all apps and do some swipes
4. Click "stop tracing"
5. Pull the logs to the device `adb pull /data/local/traces/ ~/trace`
6. Go to https://ui.perfetto.dev/
7. Click "open trace file" and navigate to the local file
8. In the trace, open the process of interest. In this case, it's the
launcher process
9. Scroll down to "InputConsumer processing"
10. The "cookie" field of each entry is the sequence number of this
event (but not the event id).
Bug: 319884471
Test: see procedure
Change-Id: I569d8be51ac7b14f8bf54a00bf027323b96b9808
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Test: atest VirtualStylusTest, VirtualStylusMotionEventTest,
VirtualStylusButtonEventTest, VirtualInputDeviceConfigTest
Bug: 304829446
Change-Id: I876e538104b674862e8509414790124b2a28d379
|
| |\ \ \ \ \
| |_|/ / /
|/| | | | |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We'd like to limit the direct usage of libvintf.
Bug: 270169217
Test: atest libinput_tests
Change-Id: I7630116345e1db736a8173467fc865cea6ec4e96
|
| |\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduce InputConsumer::probablyHasInput() to check for availability of
input events that have not been consumed yet. It performs a poll on the
underlying file descriptor.
The return value is precise (modulo rare syscall interruptions), but
clients should handle it as a performance hint. This hint would allow to
prioritize input-related work, but only when input events are *likely*
pending.
Usage constraints for a future/possible API in the Android Framework:
0. This is experimental. The usefulness of the hint has not been
broadly proven, and the functionality can be removed soon if there is
no robust data to support the usefulness.
1. The high-level API visible to apps would be effectively opt-in: does
not create any state if not used.
2. An app could use this hint to yield from longer tasks on the UI
thread (which it is not supposed to create in the first place). This
is a very niche workaround for Chrome's complexity.
3. Using the Input Hint in WebView should probably be disabled: WebView
has less control over the embedding app than Chrome, and less
knowledge when to prioritize for input handling.
4. There is a good question whether probablyHasInput() should guarantee
to return true only when input is queued. While it is good to return
precise results, clients should only use this API as an optimization
hint without sacrificing correctness. Due to the growing complexity
of input handling on Android, it is not too hard to imagine that in
some not-too-distant future input would get filtered by the Framework
on the application side, potentially skipping the contents from the
ready-to-read file descriptor or an accumulated InputConsumer batch.
Bug: b/314973388
Test: atest 'InputChannelTest#ProbablyHasInput'
Test: atest InputPublisherAndConsumerTest
Change-Id: I9681a9ddd0249e3bfd5285c6570dee7a9f5de951
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* changes:
Add delay before enabling tap while typing on physical keyboard
Cancel ongoing touchpad move gesture if user starts typing
|
| | | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
To improve touchpad palm rejection while typing, this change will cancel
any ongoing touchpad move gesture if user starts typing on keyboard. In
this change we:
1. Introduce a new flag to gaurd this change
2. Add behaviour to cancel ongoing gesture
Bug: 301055381
Test: atest inputflinger_tests
Change-Id: I0830cb24f2046380e140cddd71096b8a611c51de
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This flag will allow internal windows, like TaskBar and StatusBar, to
ignore touch while stylus is down anywhere on screen.
This is needed to reduce the chance of unintentional clicks.
Bug: 211379801
Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Change-Id: I4382b390f69094b4db8928b5caf9e9251723d32e
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before this CL, we only stored the touching pointer id's inside
TouchWindow. However, it is also necessary to know which of the touching
pointers are touch vs stylus. This would allow us in a later CL to
determine whether the stylus is currently down anywhere on screen.
In this CL, instead of storing just the pointer ids, store
PointerProperties in a vector. This includes the pointer id and the
tooltype.
There should be no behaviour change in this CL.
Bug: 316225294
Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Change-Id: I7fb2bbd46e7da7e085679ee16da3a53773931875
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The MetricsManager needs to receive UP/CANCEL events to trigger
atom reporting. I must have moved these lines around during the
refactor and overlooked this mistake.
This change also modifies MotionPredictor and MetricsManager to
hold a "ReportAtomFunction" to facilitate testing.
Test: `statsd_testdrive 718` shows atoms reported with `adb shell setenforce 0`.
Test: `atest frameworks/native/libs/input/tests/MotionPredictor_test.cpp -c` passes.
Test: `atest frameworks/native/libs/input/tests/MotionPredictorMetricsManager_test.cpp -c` passes.
Bug: 311066949
Change-Id: Icbb709bbb7cf548512e0d9aa062783d554b857e3
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: 315321016
Test: build
Change-Id: I8c76c603d638e4348cfce397c2c544ed88f95b22
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before this CL, the check for the existing pointers was not complete:
there was a chance that the MOVE event contained less than the current
number of pointers.
Fix this by checking the number of pointers before comparing the sets of
pointers.
Bug: 312714754
Test: atest libinput_rust_test
Change-Id: I4e6c00aec4247b6cb4c467ac5c2887ee3a90afba
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The new flag is used to guard the new
OVERRIDE_SYSTEM_KEY_BEHAVIOR_IN_FOCUSED_WINDOW permission.
Bug: 308482931
Test: build success
Change-Id: I51ad125ec3b4d07826db213986dac83626bca0cc
|