summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2024-11-20[Lut NDK] Add new ASurfaceTransaction_setLuts api. Sally Qi
- also provide display_luts.h file for lut and lut entry Bug: 377329333 Test: android.view.surfacecontrol.cts.ASurfaceControlTest#testSurfaceTransaction_setLuts Flag: EXEMPT NDK Change-Id: I4caa4572b5dffb3311c9743e0a2c25ca133d4834
2024-11-20Merge "MotionEvent: add safe dumping method" into main Harry Cutts
2024-11-20MotionEvent: add safe dumping method Harry Cutts
This method should allow us to log more details of an event in case of validation failures, without potential for infinite recursion in getter methods. Bug: 379368465 Test: add a test to MotionEventTest that calls getHistoricalRawPointerCoords with an invalid pointer index, and check the logs when run with `atest --host` Flag: EXEMPT logs only Change-Id: I9c7084cedbc7e6f6834cd1b401da04d07d22ce35
2024-11-19Merge "Refactor initial support check to use SupportInfo" into main Matt Buckley
2024-11-19Merge "Implement NDK createSessionUsingConfig API" into main Andy Yu
2024-11-19Merge "Add ADPF owners" into main am: c0decbc206 am: 37f549051e Xiang Wang
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3362726 Change-Id: I44268edb6478b5c293a311257dba905a2fdd4472 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-19Merge "Add ADPF owners" into main am: c0decbc206 Xiang Wang
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3362726 Change-Id: Iac275cd94926d90ca0d5995284a56e95dfd6eeb4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-18Refactor initial support check to use SupportInfo Matt Buckley
This change makes the intial support check when APerformanceHintManager starts pass the SupportInfo object instead of just relying on the preferred rate Bug: 367803904 Test: atest PerformanceHintNativeTestCases Test: atest HintManagerServiceTest Flag: EXEMPT refactor Change-Id: Iba93310c58896a2b1d02c6156b4e67eaa766af5b
2024-11-18Implement NDK createSessionUsingConfig API Andy Yu
This patch implements a new way to create ADPF hint session, with a new parcelable SessionCreationConfig. This object encapsulates the required information for session creation, with a set of setters to assign values to those fields in the session creation config. This object can be reused on the client side in order to streamline the session creation process. Bug: 362801903 Bug: 367803904 Test: atest HintManagerServiceTest atest PerformanceHintNativeTest Flag: EXEMPT_NDK Change-Id: Idd2ea87886c664b625f40066cc05c6df1bf0e6d4
2024-11-18Add ADPF owners Xiang Wang
Bug: 367803904 Change-Id: I1c3929b23f0543b18030f659fd681209fc8597c6 Test: n/a Flag: EXEMPT owners
2024-11-18Merge "Add support for converting java hint sessions to native hint ↵ Matt Buckley
sessions" into main
2024-11-18Merge "Add ADPF to PowerManager header OWNERS" into main am: 13c2918315 am: ↵ Matt Buckley
8c297a8694 Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3358418 Change-Id: Id7ee4e6f4acad5be797a92c7203430b0ba84fd16 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-18Merge "Add ADPF to PowerManager header OWNERS" into main am: 13c2918315 Matt Buckley
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3358418 Change-Id: I0e365e14aa30ccab9549ede8dd9175a3e43f95be Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-17Add ADPF to PowerManager header OWNERS Matt Buckley
Change-Id: Iddc5808654664888952b7c8848bd66e89e15a97a Test: n/a Bug: none
2024-11-17Add support for converting java hint sessions to native hint sessions Matt Buckley
Add an API called "APerformanceHint_getSessionFromJava" for Java clients to access the native APerformanceHintSession objects that Java hint sessions wrap. This should will make the Java and Native APIs substantially more interoperable. This patch also makes the native code aware of when it is being used in Java, to allow it to have slightly different behavior, especially when it is being directly accessed through JNI. The main place where this mostly matters is in preventing clients from closing Java-owned sessions through the JNI, as that could cause weird behavior otherwise. Bug: 367803904 Test: atest HintManagerServiceTest Test: atest PerformanceHintNativeTestCases Flag: EXEMPT trivial refactor Change-Id: I9bae7f78b61e40037de63839103906c3e536a743
2024-11-15Merge "Use a vector of devices in IAudioManager" into main Robert Wu
2024-11-15Use a vector of devices in IAudioManager Robert Wu
Bug: 367816690 Test: Alarm with and without USB headset Flag: EXEMPT refactor Change-Id: If707cd8abf5c248217d0855f42fb1a4900a1674d
2024-11-15KeyboardInputMapper: migrate most tests to InputMapperUnitTest Harry Cutts
Some of these tests create multiple input devices and mappers, which I didn't have time to work out how to mimic using InputMapperUnitTest. The rest have been migrated. Notes: * Split out Process_UnknownKey from Process_SimpleKeyPress, since it's a separate behaviour to test * As far as I can tell, Process_KeyRemapping was just testing the remapping code in FakeEventHub, so I removed it * Process_WhenNotOrientationAware_ShouldNotRotateDPad now checks for a display ID of DISPLAY_ID, not INVALID. This is because the method called by KeyboardInputMapper to check orientation (getAssociatedViewport) will never return an orientation without also returning a valid display ID; setting one without the other appears to have been possible in the old testing infrastructure, but would only have affected state somewhere outside of KeyboardInputMapper. For similar reasons, removed the second half of DisplayIdConfigurationChange_NotOrientationAware. * MarkSupportedKeyCodes was removed, as the code to test it would have been too bulky to test a trivial one-liner (and it would basically have been a change detector). Test: atest --host inputflinger_tests Bug: 283812079 Flag: TEST_ONLY Change-Id: Id6d2eb4ec2bae6bd0e9a263209169785e40a6024
2024-11-14Merge "Add OWNERS for *luts* files" into main am: 1e1a07f0c3 am: 3985e4e1d2 Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3349305 Change-Id: I87e0e1355890099b7b4ad1e13b3da03e80abae2d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-13Merge "Add OWNERS for *luts* files" into main am: 1e1a07f0c3 Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3349305 Change-Id: Ifa12011f30a58c8e0e2dd3e833af204efd25a0f1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-13Add OWNERS for *luts* files Sally Qi
Bug: 377329333 Change-Id: I5a0f6b406a0700ad0e9bbf8407316c98988ea2a8 Test: builds
2024-11-13Merge "Revert "Revert "Add public ADPF load hints with better rate limi..."" ↵ Matt Buckley
into main
2024-11-13Remove stray character. Dan Albert
Test: None Bug: None (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:960967767d222348825e91287255db7cff157325) Merged-In: Id0dc26c5639417061f2676ab25e5c62b775e1a65 Change-Id: Id0dc26c5639417061f2676ab25e5c62b775e1a65
2024-11-13Merge "Remove stray character." into main Dan Albert
2024-11-12Merge 24Q4 (ab/12406339) into aosp-main-future Xin Li
Bug: 370570306 Merged-In: I9be1254c3e2685b0aa950b314c581824f40ce26c Change-Id: I35bc501a2b1d9eb100aaab25cd660cf2e0542f99
2024-11-12Merge "Remove callback at the end of consumer destructor" into main Treehugger Robot
2024-11-12Revert "Revert "Add public ADPF load hints with better rate limi..." Matt Buckley
Revert submission 30360907-revert-29997970-load_hints-VOSJCKDBUL Reason for revert: because the patch is fine, actually Reverted changes: /q/submissionid:30360907-revert-29997970-load_hints-VOSJCKDBUL Change-Id: I7395b8224c5d2cda2aa02b63e11c9575fbe0db23
2024-11-12Merge "Revert "Add public ADPF load hints with better rate limiter and ..."" ↵ Priyanka Advani (xWF)
into main
2024-11-12Revert "Add public ADPF load hints with better rate limiter and ..." Priyanka Advani (xWF)
Revert submission 29997970-load_hints Reason for revert: Droidmonitor created revert due to b/378700893. Will be verifying through ABTD before submission. Reverted changes: /q/submissionid:29997970-load_hints Change-Id: Ib42a3f0478b84bb36d0a49a311cc3844512f094a
2024-11-12Merge "Add public ADPF load hints with better rate limiter and hint ↵ Matt Buckley
batching" into main
2024-11-11Remove stray character. Dan Albert
Change-Id: Id0dc26c5639417061f2676ab25e5c62b775e1a65 Test: None Bug: None
2024-11-11Add keyboard volume mute LED. (2/2) DingYong
(cherry picked from https://partner-android-review.googlesource.com/q/commit:80f60ec95afc0c5995647aa19f87b5389f656c25) Change-Id: I75f68a34b2557deeb9e5d760480e5ab4aa6af328 Bug: 373556678 Flag: NONE external OEM contribution only active in their devices
2024-11-07Add new 25Q2 keycodes to native Vaibhav Devmurari
Test: None Bug: 365920375 Flag: com.android.hardware.input.enable_new_25q2_keycodes Change-Id: If8d07744844eff38226e022dfb04195321a0976b
2024-11-06Merge "Reimplement Chromium's OneEuroFilter to InputConsumer" into main Treehugger Robot
2024-11-05Reimplement Chromium's OneEuroFilter to InputConsumer Paul Ramirez
Reimplemented Chromium's OneEuroFilter usage to InputConsumerNoResampling. There are a few differences between Chromium's work and this CL. We reimplemented One Euro filter an adaptive cutoff frequency low pass made in this implementation as in the Chromium's implementation. The class FilteredResampler filters the output of LegacyResampler using the One Euro filter approach. Here's the link to Chromium's to One Euro filter: https://source.chromium.org/chromium/chromium/src/+/main:ui/base/prediction/one_euro_filter.h Bug: 297226446 Flag: EXEMPT bugfix Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST Change-Id: I0316cb1e81c73b1dc28dc809f55dee3a1cc0ebd2
2024-10-30Merge "Define new ASurfaceTransaction_setFrameRateParams API" into main Rachel Lee
2024-10-30Merge "Remove superfluous #include." into main am: 1330b03c4c am: efb1b6c1f4 Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3325081 Change-Id: Ifc9da2b3df8eff909ea248cd18b5060d3e68aeba Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-29Remove superfluous #include. Dan Albert
This is implicit in Android's sys/cdefs.h and this header is also built for the host, which doesn't have this header. The missing header was previously hacked around by symlinking the header into a directory that would be included by host builds, but the real header is sensitive to the contents of sys/cdefs.h so that wasn't sound anyway (and we in bionic have no interest in keeping it and its dependencies compatible with non-Android). It was included for __INTRODUCED_IN(), but that's already defined by a command-line argument, so we can just remove the #include. Bug: None Test: treehugger Change-Id: Ia9b057118ac70de1a8d2d6b8898b9fee00887a7e
2024-10-28Add public ADPF load hints with better rate limiter and hint batching Matt Buckley
- Adds ADPF public load hint NDK API - Updates rate limiter to use a single budget for all load hints - Adds support for load hint batching, to send multiple hints at a time - Requires users of load hints to annotate their hints for better traces Bug: 367803904 Test: atest HintManagerServiceTest Test: atest PerformanceHintNativeTestCases Flag: android.os.adpf_use_load_hints Change-Id: I08502599aff0471bd73adc586245da2c924d24e0
2024-10-28Define new ASurfaceTransaction_setFrameRateParams API Rachel Lee
In libandroid. Bug: 362798998 Test: atest SetFrameRateTest Flag: EXEMPT NDK Change-Id: Id52288f77bf43f4c7573c6743e5307d849490852
2024-10-25Do not resample when frameTime is not available Paul Ramirez
LegacyResampler still resamples MotionEvents even when requestedFrameTime is std::nullopt. The problem is that if the parameter requestedFrameTime is std::nullopt, it is reassigned inside consumeBatchedInputEvents to std::numeric_limits<nsecs_t>::max(). In spite of using max() as a placeholder to indicate that everything should be consumed, it is still a valid time, and resampler uses it to resample MotionEvent. To fix this issue, having a valid requestedFrameTime should also be a condition to resample MotionEvents. Bug: 374375203 Flag: EXEMPT refactor Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST Change-Id: I6e53bdd0a35d359da8b50f10dd4aad9bddc8aa3f
2024-10-22Add map like pointer lookup to LegacyResampler Paul Ramirez
Added map lookup operations to find pointers by ID when resampling them inside LegacyResampler. The CL fixes the assumption that pointers should appear in the same order between motion events. Moreover, tests from LegacyResampler are updated to the new behavior. Bug: 297226446 Flag: EXEMPT refactor Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST Change-Id: I59c83d2e55bf4ab3cb7958cab333428499f6fee8
2024-10-22Remove callback at the end of consumer destructor Siarhei Vishniakou
It turns out that 'finishInputEvent' was adding the fd back to the looper. This caused an NPE because we were calling 'finishInputEvent' at the end of the consumer destructor, thus leaving the callback in the looper. The looper would hit an NPE whenever the fd signaled after that. To fix this, we move the call to setFdEvents(0) to the very end of the destructor. This way, we can be sure that the last thing that executes is the removal of the fd from the Looper. There is also a possibility that fd is signaled during the destructor execution. Theoretically, this should be okay because the fd callbacks are processed on the same thread as the one where destructor runs. Therefore, the signals would only be processed after the destructor has completed, which means the callback would be removed before it gets the chance to execute. Bug: 332613662 Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="*InputConsumerTest*" Test: TEST=libutils_test; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST Flag: EXEMPT bugfix Change-Id: If5ac7a8eaf96e842d5d8e44008b9c1bff74e674e
2024-10-17Copy KeyCharacterMap object when we fill InputDeviceInfo(1/n) Linnan Li
Currently, in InputDeviceInfo, we store the KeyCharacterMap object, which is actually the original KeyCharacterMap from the EventHub. This could potentially lead to issues where two threads operate on the same KeyCharacterMap object simultaneously, resulting in thread safety problems. To avoid potential risks in the future, we make a copy of the original KeyCharacterMap when generating InputDeviceInfo. This change should not introduce any behavioral changes. Bug: 373011069 Flag: EXEMPT refactor Test: presubmit Signed-off-by: Linnan Li <lilinnan@xiaomi.corp-partner.google.com> (cherry picked from https://partner-android-review.googlesource.com/q/commit:1be9c1ce7400e38cf3f45921d7181e947929f91c) Merged-In: I0d0155133f95b0f1dc925422eda0da04c6f196ea Change-Id: I0d0155133f95b0f1dc925422eda0da04c6f196ea
2024-10-15Merge "Add SYSUI session tag and update PowerHAL version" into main Matt Buckley
2024-10-14Merge "Add new mute state for port volume mute" into main Vlad Popa
2024-10-11Reland "Reject inconsistent globally injected events" --try 2 Siarhei Vishniakou
This reverts commit f7f93f5fd5afa40858ac492402ec6cc85fe89275. Reason for revert: fixed tests Changes: the test for inconsistent sequence needed to be updated because the injection will now always fail. Original description: The dispatcher currently crashes when certain inconsistent input events are injected. This is affecting test stability negatively. In this CL, we reject globally-injected inconsistent events. That may cause some test flakiness, but should eliminate the crashes due to dispatcher reaching bad state later. Unfortunately, we can't currently reject all inconsistent injected events. In the case of targeted injection, it is common for the caller to leave pointers dangling. Since the injection happens into the caller-owned windows only, at the end of those tests the windows get cleaned up, so the dispatcher is still in a good state. The eventual goal is to completely get rid of injection. Meanwhile, however, this should help avoid at least some of the crashes. Bug: 369935405 Flag: EXEMPT bugfix Test: atest inputflinger_tests Change-Id: Ic778677a63e544feadf01f3cc47b08ec3b207297
2024-10-11Merge "Revert "Reject inconsistent globally injected events"" into main Liana Kazanova (xWF)
2024-10-11Revert "Reject inconsistent globally injected events" Liana Kazanova (xWF)
This reverts commit f6abbf4b919b121614384ab2286bcaf16bedd344. Reason for revert: DroidMonitor: Potential culprit for http://b/372964183 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted Change-Id: I9cdb4dfb4ca14a90d7527e5f546380ea6ec1d62f
2024-10-11Merge "Reject inconsistent globally injected events" into main Treehugger Robot