summaryrefslogtreecommitdiff
path: root/services
AgeCommit message (Collapse)Author
2025-09-18[SP 2025-09-01] Don't blur too many layersbanksia-dev Alec Mouri
An application requesting lots and lots of blurs: a. Enables pixel stealing by measuring how long it takes to perform a blur across windows b. Probably isn't very valid anyways. So, just arbitrarily pick an upper bound for blur requests that a display is allowed to manage (10), and disable everything else. Arbitrarily, pick the 10 "front-most" blurs to be respected. Bug: 399120953 Flag: EXEMPT security Test: Security PoC no longer PoCs (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fbcb9ae5eb45e2273be05d5366b47bd8436c1718) Merged-In: Ie7195eb852b52aff2f58da8bd095d8684baceef6 Change-Id: Ie7195eb852b52aff2f58da8bd095d8684baceef6
2025-04-15Fix build break in 25Q2-release Vishnu Nair
Bug: 277076451 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5013ab8640c7cbd8fdf89f133b4fa9184576e26f) Merged-In: I5f9fb4e011abb383c51b0fc03553947f325c20ae Change-Id: I5f9fb4e011abb383c51b0fc03553947f325c20ae
2025-04-15Include color layers in input list to fix tapjacking vulnerability Wenhui Yang
We can use this to compute occlusion more accurately in inputdispatcher. Bug: 277076451 Test: app-debug.apk in the bug Test: go/wm-smoke Flag: EXEMPT bugfix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1f0301b3f1061cb89d9628bbb1d2b4594f4f29dc) Merged-In: I1e155bcf4a6a7ff1b49338ec21bb0e9ee05a54c8 Change-Id: I1e155bcf4a6a7ff1b49338ec21bb0e9ee05a54c8
2025-03-24Merge "Remove spurious std::move()." into main Treehugger Robot
2025-03-24Remove spurious std::move(). Anton Ivanov
Flag: EXEMPT refactor Bug: 385156191 Test: presubmit Change-Id: I2cfc6969291d207c73608c0c045d1eec70852278
2025-03-24Merge "Add border API to surface control" into main Cairn Overturf
2025-03-21Merge "Detect secure layers and start lazy HDCP activation" into main Huihong Luo
2025-03-21Merge "Remove HDCP vsync hack" into main Huihong Luo
2025-03-21Merge "Revert^2 "Use TransactionState in SurfaceFlinger."" into main Treehugger Robot
2025-03-21Detect secure layers and start lazy HDCP activation Huihong Luo
Layer snapshots are traversed to check for secure layers, then trigger HWC to start HDCP activation when a secure layer is detected. Flag: com.android.graphics.surfaceflinger.flags.hdcp_negotiation Bug: 372902990 Bug: 375340594 Test: manual Change-Id: Ie52159043f94d7cdb079d7c48c47764017a979f5
2025-03-21Merge "end2end: OWNERS" into main Treehugger Robot
2025-03-21Remove HDCP vsync hack Huihong Luo
New HDCP hal api will be used. Bug: 402406598 Flag: EXEMPT bugfix Test: manual Change-Id: I361c032d2b373a122e24194883c9fee9c6a262b2
2025-03-21end2end: OWNERS Lloyd Pique
Set up a more local set of OWNERS for more dedicated reviews. Flag: TEST_ONLY Bug: 372735083 Test: None Ignore-AOSP-First: Test code not yet in AOSP Change-Id: Ib9249f4534dcc167800081b97294a2697bf5d5a5
2025-03-21Merge changes from topic "getSysfsRootPath" into main Prabir Pradhan
* changes: EventHub: Re-open Devices serially when AssociatedDevice changes InputReader: Add getter API for the sysfs node path of an InputDevice
2025-03-21Merge "EventHub: Process sysfs node changes from InputReader thread" into main Treehugger Robot
2025-03-21Merge "Remove ScopedAddToTraversalPath" into main Treehugger Robot
2025-03-21Merge "EventHub: Close opening device before deleting on sysfs change" into main Prabir Pradhan
2025-03-20Merge "Revert "Turn off synthetic VSYNC when adjusting thread scheduling for ↵ Treehugger Robot
performance"" into main
2025-03-20Remove ScopedAddToTraversalPath Patrick Williams
ScopedAddToTraversalPath is an RAII wrapper that copies the existing traversal path, modifies it, and then restores the modified properties from the copy when deleted. It's simpler to make the child path a copy and not modify the parent. Bug: 403312802 Flag: EXEMPT refactor Test: presubmits Change-Id: I8f06ed557f29444be6df51c1c8ea60958a82ee95
2025-03-20Merge "[SF] Backdoor to update the WorkDuration" into main Ram Indani
2025-03-20Revert "Turn off synthetic VSYNC when adjusting thread scheduling for ↵ ELIYAZ MOMIN (xWF)
performance" This reverts commit bac7071aa3b1ae72f90b904b9af61b5c74ba9265. Reason for revert: Droidmonitor created revert due to Jank regression b/404073995. Change-Id: Id57f5cda7a34f4598a82d86d7290d5b1c57f1315
2025-03-20Merge "surfaceflinger formatting" into main Daniel Zheng
2025-03-20[SF] Backdoor to update the WorkDuration ramindani
Test: atest libsurfaceflinger_unittest Test: Verified with a trace that work duration updates after backdoor call. BUG: 398872242 Flag: EXEMPT Backdoor implementation. Change-Id: Icea9bebbb3366df09643dbe40fd7c986461262b8
2025-03-20Merge "InputDispatcher: Provide a way to transfer the entire gesture" into main Treehugger Robot
2025-03-20Revert^2 "Use TransactionState in SurfaceFlinger." Anton Ivanov
This reverts commit 4f8b4f371947dce3abece1c0d64af0b5c990e0c2. Reason for revert: Rolling forward with fix for use-after-move in SurfaceFlinger::setTransactionState Flag: EXEMPT refactor Bug: 385156191 Test: presubmit Change-Id: I66d45b1e125dcb50cbe7a3cfcefa8eaa02705419
2025-03-19InputDispatcher: Provide a way to transfer the entire gesture Siarhei Vishniakou
In this CL, we modify the behaviour of 'transferTouchGesture' to also allow the caller to request that the entire gesture is transferred to the destination window. Suppose the original window receives ACTION_DOWN and calls transferTouchGesture to the destination window. Before this CL, the subsequent pointers would always be routed to the original window. In this CL, the caller of 'transferTouchGesture' can choose to transfer the 'entire gesture', meaning that subsequent pointers from the same gesture that land in the original window would automatically be sent to the destination window. Bug: 397979572 Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST Flag: com.android.input.flags.allow_transfer_of_entire_gesture Change-Id: I760ddb8aa8f329d0b21788e6d6e83c802015ee1d
2025-03-19surfaceflinger formatting Daniel Zheng
no functionality changes here. just some clang-tidy formatting Flag: EXEMPT refactor Test: th Change-Id: I25cd53c40d4fde1edb29f4b8fee28df6f4b66235
2025-03-19Add border API to surface control YCairn Overturf
See go/sf-box-shadows-api for more details Bug: b/367464660 Flag: com.android.window.flags.enable_border_settings Test: atest SurfaceFlinger_test Change-Id: I1190edb97693004d9f46058fd0165451470a65b3
2025-03-19EventHub: Re-open Devices serially when AssociatedDevice changes Prabir Pradhan
This CL changes behavior so that when an AssociatedDevice changes, all affected Devices will be re-opened serially, where the DEVICE_REMOVED notification of one device closing is followed by the DEVICE_ADDED signal of its new counterpart, before proceeding with the re-opening of the next affected Device. This is to temorarily curb the side-effects of delayed AssociatedDevice changes by reducing the number of cases where we send device removed notifications immediately after an input device is first connected, followed by the addition of a new InputDevice. These kind of "hotplug" events are detrimental to many tests and may have side effects in production. This CL relies on some assumptions on how devices will be merged in InputReader, so it does not solve the problem for all cases. It only aims to reduce the likelihood of impact temporarily until AssociatedDevice changes can be processed separately in InputReader, which is backlogged as b/281822656. Bug: 397208968 Test: Presubmit Flag: EXEMPT bug fix Change-Id: I61818076a720a5474de8cbeb431ddbceec6e1545
2025-03-18Introduce surfaceflinger_end2end_tests Lloyd Pique
Introduces a minimal surfaceflinger_end2end_test target, which will work by controlling both the "front-end" of surfaceFlinger via the libgui ISurfaceComposer.aidl interface, as well the "back-end" of surfaceflinger via the hardware Composer3 IComposer.aidl interface. There is only a minimal implementation for everything. To start out, the test registers a simple "fake" composer3 backend service that asserts if SurfaceFlinger actually uses it to create a client interface, and otherwise the initial test just tries to connect to the front end service. The main purpose of this CL is to introduce all the main framework classes, and otherwise set up the build target. For now this fails, with SurfaceFlinger establishing a connection to the service, but the test process aborts in the stub to create the client interface. SurfaceFlinger doesn't crash, but is in a bad state. The AndroidTest.xml file however brings the target back to a normal working state with tear-down commands meant for this purpose. Flag: TEST_ONLY Bug: 372735083 Test: atest surfaceflinger_end2end_tests Change-Id: I78be88a3eb3df9b6c700f78bdef66f9dc71399c7
2025-03-18Merge "TouchpadInputMapper: dedup successive swipe lift gestures in metrics" ↵ Treehugger Robot
into main
2025-03-18Merge "Add support for search modifier fallbacks" into main Treehugger Robot
2025-03-18EventHub: Process sysfs node changes from InputReader thread Prabir Pradhan
Before syfs node change notifications were processed by EventHub, all device openings and closings happened on the InputReader thread. The upper layer (InputReader) makes assumptions about EventHub Device states being synchronized with the notications of device additions and removals from EventHub to InputReader. The addition of sysfs node change processing moved some device openings and closings off of the InputReader thread, which can break the synchronization assumptions in InputReader. In this CL, we move sysfs node change processing to the InputReader thread. Bug: 397208968 Bug: 358694799 Test: Presubmit Flag: EXEMPT bug fix Change-Id: If6d70a12ddf74098c74b8360d31c4967ae6b3d03
2025-03-18InputReader: Add getter API for the sysfs node path of an InputDevice Prabir Pradhan
Bug: 397208968 Test: Presubmit Flag: EXEMPT bug fix Change-Id: I25f41f41ec1f1e47590eef21b982287caea193a6
2025-03-18EventHub: Close opening device before deleting on sysfs change Prabir Pradhan
We must unregister all fds from epoll before closing them to avoid the fds from remaining open and thus leaking. Prevent fd leaks by closing any opening device from epoll before closing the Device via its destructor when the sysfs node changes and triggers a device reopening. In this CL, we modify the closeDeviceLocked function to also look at mOpeningDevices when a device is being closed. Context: https://idea.popcount.org/2017-03-20-epoll-is-fundamentally-broken-22/ Bug: 397208968 Test: Presubmit Flag: EXEMPT bug fix Change-Id: I3de8a9413e68a0b7409e5d0bf56b9d76b7164b49
2025-03-18TouchpadInputMapper: dedup successive swipe lift gestures in metrics Harry Cutts
In tests, the Gestures library occasionally outputs two lift gestures in a row, which can cause inaccurate metrics reporting. To work around this, keep track of the previous gesture the metrics collector saw, and don't report additional swipe gestures if we see multiple lifts in a row. Bug: 397219482 Test: $ atest \ CtsInputHostTestCases:android.input.cts.hostside.InputAtomsTest Flag: TEST_ONLY Change-Id: Iac2b6ae68dc62e3a106a743b667eddd96a1a7a74
2025-03-18Merge "Prune logic from buffer stuffing recovery using UIDs" into main Melody Hsu
2025-03-18Merge changes I60d42f38,I25857739 into main Treehugger Robot
* changes: Ensure Choreographer is held as sp<> in SurfaceControl. Harden construction sites of android::StrongPointer in frameworks/native
2025-03-18Merge "Revert "Use TransactionState in SurfaceFlinger."" into main Treehugger Robot
2025-03-17Revert "Use TransactionState in SurfaceFlinger." Anton Ivanov
This reverts commit ed63243743079eb4531cb4a9e5ed4dccb7965d6d. Reason for revert: Droidmonitor created revert due to Jank regression b/403375000. Change-Id: I558338084124764026028b21667b45afb73b9e06
2025-03-17Harden construction sites of android::StrongPointer in frameworks/native Anton Ivanov
Test: presubmit Flag: EXEMPT refactor Bug: 393217449 Change-Id: I25857739af659a52d2e33fc0e05799959f4024ab
2025-03-17Prune logic from buffer stuffing recovery using UIDs Melody Hsu
Buffer stuffing recovery was initially implemented using UIDs and sending events to subscribed clients. A different, simpler approach using callbacks when blocked on dequeueBuffer has since been favored (change-id I24e34591e809aebd7626657c6340faed323227ad) and leaves the initial UID event subscription logic obsolete. Leaving this code causes issues since the logic attempts to update an event that is part of union, causing issues in other events that do not hold onto the current object. This is a partial revert of change-id I38f0eb3d6ef1331e07d6022fa3a0e16c556ba06f Bug: b/294922229 Test: presubmit Flag: EXEMPT, code cleanup Change-Id: I53f653550c58376c8d82a491ecf0aebdeeafbc0d
2025-03-17Add support for search modifier fallbacks Jimmy
Fixes a bug in where kcm fallbacks with search based modifiers could not activate since PhoneWindowManager would consume all search events. This prevented the InputDispatcher from generating the fallback. This change modifies the behavior so InputDispatcher handles whether the search-based event will attempt to generate a fallback. Bug: 384113980 Test: atest InputDispatcherTest Flag: com.android.hardware.input.fix_search_modifier_fallbacks Change-Id: Ib7eca10f00ec93fd46a93396b7908ff925dd705b
2025-03-17Merge "Print display ids of Virtual Displays too" into main Pierre Barbier de Reuille
2025-03-17Merge "Simplify libvibratorservice after HIDL support removal" into main Treehugger Robot
2025-03-17Merge "Refactor PowerHalController and add a binding for composition data" ↵ Matt Buckley
into main
2025-03-17Simplify libvibratorservice after HIDL support removal Lais Andrade
Introduce a simplified VibratorController class to the libvibratorservice module that only handles AIDL vibrator HAL versions and reuse the binder ndk objects. This removes all wrapper classes introduced to handle both AIDL and HIDL objects seamlesly, reducing complexity for the library. The connect/reconnect logic on transcation falure remains, with most HAL operations working with a retry logic. This first change introduced the core for the VibratorController with basic APIs like off / setAmplitude / setExternalControl. Following changes will introduce the remaining IVibrator API support. Bug: 308452413 Test: libvibratorservice_test Flag: android.os.vibrator.remove_hidl_support Change-Id: Ie76168eaf9fd5cd0ce9719499d4ef9b086b2fca6
2025-03-17Merge "Avoid copying Transaction objects unneccessarily." into main Anton Ivanov
2025-03-17Print display ids of Virtual Displays too Pierre Barbier de Reuille
This impact the output of `dumpsys SurfaceFlinger --display-id`. Note: this will output the ids of the same displays than `dumpsys SurfaceFlinger --displays`. Similar to that command, phyical displays will be enumerated first. Fix: 403588742 Flag: EXEMPT (small change in dumpsys) Test: build and run with an overlay Change-Id: I176b0894c3dd4fc2ecd30809ed117b87464f8d85
2025-03-17InputDispatcher: Initialize mWindowInfosVsyncId Prabir Pradhan
Bug: 402990967 Flag: EXEMPT bug fix Test: Presubmit Change-Id: Ib8f99c0285df211362a02e92063e3c78bf26b9fb