- May 08, 2024
-
-
Yi Kong authored
These functions intentionally overflows integers. The upcoming compiler update, clang-r522817, will start complaining about these overflows. Test: boot with new compiler Bug: 325934863 Change-Id: Idb3730c652ae739b73c09517665b518a79b60345
-
- May 06, 2024
-
-
Marijn Suijten authored
The surface control and transaction are barely every null in most calls, but some informational structures like HDR metadata, and the surface control when reparenting are allowed to be null. Change-Id: Ia1a456041daf8136d856a1901881b74f97b3593a Merged-In: Ia1a456041daf8136d856a1901881b74f97b3593a Test: make aosp_cf_x86_64_phone Signed-off-by:
Marijn Suijten <marijns95@gmail.com>
-
- May 03, 2024
-
-
Dan Albert authored
The messages come from a different CL in AOSP, but that CL breaks internally because this code doesn't exist in AOSP. Merging the compatibility thing first so I can land the rest in AOSP. Bug: None Test: None Change-Id: I906c6ea7bd6d891aba9e185756131ac5b34f3c3d
-
- May 02, 2024
-
-
Dan Albert authored
Bug: None Test: treehugger Change-Id: I3a52883fba0e31f05e50cd51193bbb306418b18a
-
Lloyd Pique authored
* Disallow NonNull<bool> by checking for nullptr, instead of false. * Add an "operator bool()" to work like other smart pointers. * Add [[nodiscard]] where it makes sense. * Implement the full set of comparison operations, and allow comparisons between NonNull<P> and another type Q. This allows the use of NonNull<P> in sorted containers like std::set, and allows easier lookup via unwrapped pointers. * Specialize std::hash for NonNull. This allows the use of NonNull<P> in hashed containers like std::unordered_set. Test: atest ftl_test Bug: 185536303 Change-Id: Ib1090e393ea5f5641be2cd9c61011049039ea615
-
Lloyd Pique authored
ftl::contains(container, value) returns true if the container contains the value. It's implemented in terms of std::find(), so has the same runtime complexity. It is otherwise a simplified version of the C++23 std::ranges::contains, which has some additional options, and can be deprecated once C++23 is the minimal supported version. Test: atest ftl_test Bug: 185536303 Change-Id: I98aefe7cf6645ac3a20fddfe0657fa6822d669de
-
- May 01, 2024
-
-
Siarhei Vishniakou authored
This is already useful in several places, and it's going to be also useful in the future when InputConsumer is refactored. So let's move it to include/input. Bug: 311142655 Test: m inputflinger_blocking_queue_fuzzer (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3782af62ea590e8945f2175a90aa2b6f4995814d) Merged-In: Idfc492c6bfc3cccab7e0b0d12b21a41a954cc44b Change-Id: Ie662961b77d331cd62b529bae0fd66e56a69bd19
-
Siarhei Vishniakou authored
To ensure that the future updates are consistent across java, cpp, and rust, we move all of motion event flags to aidl. That will be the source of truth for those constants. That still doesn't ensure that in the future updates, we forget to add these to all the languages, but at least now it will be much easier to do so. Bug: 309829647 Test: m sync Change-Id: Ibb92c0c2b2da3b07eac3886c6fd652a295037099
-
- Apr 29, 2024
-
-
Alan Ding authored
Extends stable hash from libui by increasing maximum string length supported from 16 to 64 bytes (CityHash64 v1.0.1 - please see http://code.google.com/p/cityhash/). Bug: 185536303 Bug: 194863377 Test: ftl_test Test: Compare with 64-bit std::hash<std::string_view> Change-Id: Ib123d0690a0d2150aa51c91526784dcf77a65d46
-
- Apr 24, 2024
-
-
Harry Cutts authored
These occur when an enum value is formatted as an integer without a cast. In all these cases the debug logs are nicer if we use the actual name of the enum value, so wrap them all in ftl::enum_string calls. Bug: 245989146 Test: Check there are no -Wformat warnings in the output of $ m checkinput Change-Id: I26333123e9fb445f1640c5e73757ddf4ad2d6e98
-
- Apr 23, 2024
-
-
Matt Buckley authored
Adds a hidden method for the creation of special "internal" hint sessions with extra metadata, and plumbs hwui to use it Bug: 330553312 Test: atest PerformanceHintNativeTestCases Test: hwui unit tests Change-Id: I2e7eb8fe010b7314c3e91ec2d11ac1910c234262
-
Linnan Li authored
We currently display the pointer for all devices that support displaying it, but there are actually some devices that are disabled and shouldn't actually have it displayed for them, here's an implementation for that. This is done by adding an enabled state to the InputDeviceInfo to determine its disabled status. Bug: 335795596 Test: atest inputflinger_tests Signed-off-by:
Linnan Li <lilinnan@xiaomi.corp-partner.google.com> (cherry picked from https://partner-android-review.googlesource.com/q/commit:d7c5c6d376f5eae7cbb7cce5ea12f2ba420d87ab) Merged-In: Ibdad9f8424a29d83412866eace0ef96026fb270a Change-Id: Ibdad9f8424a29d83412866eace0ef96026fb270a
-
- Apr 19, 2024
-
-
Marijn Suijten authored
The surface control and transaction are barely every null in most calls, but some informational structures like HDR metadata, and the surface control when reparenting are allowed to be null. Change-Id: Ia1a456041daf8136d856a1901881b74f97b3593a Test: make aosp_cf_x86_64_phone Signed-off-by:
Marijn Suijten <marijns95@gmail.com>
-
- Apr 16, 2024
-
-
DingYong authored
Change-Id: I6e18c9d99d562aec112fc8ecb3d4e916285368c6 Test: Built
-
- Apr 12, 2024
-
-
Xiang Wang authored
This keeps it consistent with the SDK doc. Bug: 332253611 Test: n/a Change-Id: I988f9be7eb37ac1d57edd403dc30f0e17e2b2db3
-
- Apr 02, 2024
-
-
Marijn Suijten authored
By declaring the ABI of `enum` types, the `enum` type can now be used in place of a raw and untyped integer in function parameters and structure fields, self-documenting what the possible values are. Test: treehugger Change-Id: I6b9cf8b36b16e23c0e992f8155452bd194e6e1ad Signed-off-by:
Marijn Suijten <marijns95@gmail.com>
-
Dan Albert authored
Bug: https://github.com/android/ndk/issues/1920 Test: treehugger Change-Id: Ib8296e7b9c86809d16fbde0787d016095a189387
-
- Mar 30, 2024
-
-
Derek Wu authored
This will change MotionPredictor::predict() outputs once enable_prediction_pruning_via_jerk_thresholding is enabled. Test: atest libinput_tests --host with local flag override to enable enable_prediction_pruning_via_jerk_thresholding. Test: atest CtsInputTestCases Test: atest MotionPredictorBenchmark MotionPredictorTest Bug: 266747654 Change-Id: I11eb1972246468a1f3824656f5ac57e01e0359cd
-
- Mar 29, 2024
-
-
Siarhei Vishniakou authored
This will help understand when it's created and destroyed. This also helps disambiguate between multiple InputConsumers in the same process. 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: 311142655 Test: perfetto test procedure described above Change-Id: If8cdadd3604e8e3ab24c45a5ccf4ea9ffa9fee4a
-
- Mar 27, 2024
-
-
Derek Wu authored
This is a no-op Test: atest libinput_tests Bug: 266747654 Change-Id: I0f67a1d8ea59a6851afa6f523b6e00b2281745d0
-
- Mar 26, 2024
-
-
Yuichiro Hanada authored
to be shared between Java and C++. The values of PointerIconStyle in Input.h and the constants in PointerIcon.java are manually synced now. This change introduces an AIDL file which can be used by both. Bug: 235023317, 330827347 Test: presubmit Change-Id: I01f31868e7c13270047673d97035783deaf0a7f6
-
- Mar 21, 2024
-
-
Linnan Li authored
Because of the existence of extra spaces, the owner of keycodes.h is not configured as expected. We should delete this extra spaces. Bug: none Test: After merging, check whether the owner of keycodes.h includes all users under INPUT_OWNER Change-Id: I634c49f53a4633bdee3cdefbf0debae4dff90a47
-
- Mar 20, 2024
-
-
Chavi Weingarten authored
Test: Builds Bug: 330375394 Change-Id: I54a51e3f78d5c44067369d3fce3a61fd18a4157b
-
- Mar 15, 2024
-
-
Chavi Weingarten authored
Bug: 324271765 Test: ASurfaceControlInputReceiverTest Change-Id: I19a1c796c1d22e8b247368df07c34c1b4b195e64
-
Siarhei Vishniakou authored
This will allow the upper layers to release the ownership and hand the object over to the ndk client. The client will then assume the ownership. This is not possible with the current implementation of rvalue, because the ndk interface is only using pointers. Unfortunately, this makes things more clunky for tests (unless we modify BlockingQueue). Bug: 324271765 Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_repeat=100 --gtest_break_on_failure Change-Id: I0cf326a22f840be6f8aa00d1e69f818815788487
-
Siarhei Vishniakou authored
In this CL, an InputConsumer with built-in looper handling is being added. This will be useful for native code that needs batching, and that provides choreographer callbacks directly into native code. Before this CL (and with this CL, temporarily) the InputConsumer logic was split between native and jni layers. In general, we shouldn't have logic inside jni. But in this case, the situation was also making the code difficult to reason and debug. In this new InputConsumerNoResampling class, all of the features of InputConsumer and NativeInputReceiver are combined, except for resampling. That will be done separately, at a later time. As a result, we will not be switching to the new InputConsumerNoResampling class right away. Once resampling is added, we can switch to the new InputConsumerNoResampling (and rename it to InputConsumer), and delete the old InputConsumer. In the meantime, the new InputConsumerNoResampling will be useful in the new NDK APIs. There, having resampling is not critical. Bug: 311142655 Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_repeat=100 --gtest_break_on_failure Change-Id: I468ddbd8406c4bf9f5e022f79fd1a582ba680633
-
- Mar 14, 2024
-
-
Chavi Weingarten authored
Test: Builds Bug: 203080148 Change-Id: I586339b82e408e0ac90944ab280a2d5b79309141
-
- Mar 13, 2024
-
-
Siarhei Vishniakou authored
This helps to keep track of things, and it also allows easier deletion in the future. Bug: 311142655 Test: none Change-Id: Iece2bf6857ab05f86072031a4cf3a36f843b1634
-
Chavi Weingarten authored
Added a native class that corresponds to the Java InputTransferToken. Test: SurfaceControlInputReceiverTests Test: AInputTransferTokenTest Bug: 324271765 Change-Id: Ida2a7b34338560dfed9af7f510d64372e41384af
-
Hiroki Sato authored
Instead of sending boolean to indicate the capture state, InputDispatcher now sends an input window token that requests a pointer capture, or nullptr otherwise. This is useful for some InputReader implementations. Also, this token can be used to verify if a pointer capture changed event from a reader is valid. Bug: 259346762 Bug: 301628662 Test: inputflinger_tests Test: android.view.cts.PointerCaptureTest WindowFocusTests#testPointerCapture Change-Id: Ie8343db6744dc2080f7f1dcff5a630be5c87fa3e
-
- Mar 11, 2024
-
-
Siarhei Vishniakou authored
This is already useful in several places, and it's going to be also useful in the future when InputConsumer is refactored. So let's move it to include/input. Bug: 311142655 Test: m inputflinger_blocking_queue_fuzzer Change-Id: Idfc492c6bfc3cccab7e0b0d12b21a41a954cc44b
-
- Mar 07, 2024
-
-
Siarhei Vishniakou authored
This way, they can be reused by other code in that file. For example, by the new "InputConsumerNoResampling". Also, pass the parameters by ref because they are not nullable. Bug: 311142655 Test: m libinput libinput_tests Change-Id: Ib40bcddfcb3d49b0a42d58533dcc566d9d49a500
-
- Mar 06, 2024
-
-
Alec Mouri authored
Bug: 327182552 Test: builds Change-Id: Ic8dd3ee6e649e493512a32956ac6d97e2627d25f
-
- Mar 05, 2024
-
-
Prabir Pradhan authored
MotionEvents store the underlying axis values in the coordinate space of the physical display, or "untransformed" space. The MotionEvent's mRawTransform takes those coordinates into the coordinate space of the logical display, or "raw" coordinates. The MotionEvent's mTransform takes those coordinates into the window/View's local coordinates. Previously, getting the motion event offset would return the offset with respect to the origin of the "untransformed" space. This is of little value to callers, since they are expecting the offset in "raw" coordinates, which is the offset with respect to the logical display's origin. To calculate the raw offset, we calculate where the raw point (0, 0) would map to in untransformed coordinates by applying the inverse raw transform, and then apply the window transform. Bug: 249340921 Test: atest libinput_tests Test: atest inputflinger_tests Change-Id: Iadbdde4dd45b5527b73be863b198b4c9a9e713cc
-
Prabir Pradhan authored
There is already a native implementation of split in InputDispatcher. Prevent code duplication by moving the Java impl to native. The Java impl is not correct, because it cannot access all values like the transforms to initialize the split event with. Bug: 326171104 Test: atest libinput_tests Test: atest inputflinger_tests Change-Id: I6230b6aa0696dcfc275a5a14ab4af3d4b7bd0b45
-
- Mar 04, 2024
-
-
Matt Buckley authored
- Updates support checks to check status for UNKNOWN_TRANSACTION - Adds PowerHintSessionWrapper class to check support on session methods - Ensures that wrapper methods check the HAL version number for support - Adds macros to cache returned wrapper call support status Bug: 324255931 Test: atest libpowermanager_test Test: atest libsurfaceflinger_unittest:PowerAdvisorTest Change-Id: I4b329e6b55c53198bb064a34e792be6336e66e27
-
- Feb 28, 2024
-
-
Arpit Singh authored
As AInputEvent_toJava makes JNI calls, the caller must ensure there are no pending JNI exceptions as it may result in undefined behaviour. This needs to be explicitly documented. Refer: https://developer.android.com/training/articles/perf-jni#exceptions Bug: 324375527 Test: atest MotionEventTest KeyEventTest Change-Id: If9f40ba1ee2cb091514fb3baae28f2ca7520727e
-
- Feb 23, 2024
-
-
Dan Albert authored
This is far from the only C incompatibility in this file, but it's the one that's most likely to not break builds, so I'm starting small. This is a source compat break, but not an ABI break. Bug: https://github.com/android/ndk/issues/1920 Test: treehugger Change-Id: I5a32762fa61b1399fb354397479603858184ea05
-
- Feb 20, 2024
-
-
Prabir Pradhan authored
Bug: 210460522 Test: atest inputflinger_tests Change-Id: I2ab660ed0a6888c23bc711fb8494385c22b3c404
-
- Feb 16, 2024
-
-
Jerome Gaillard authored
This is needed to create a host implementation of RenderThread. Bug: 322360037 Test: build libandroid_runtime on host Change-Id: I23f78155e0d2c511451e3e249537b83ca06f411a
-