summaryrefslogtreecommitdiff
path: root/libs/androidfw/Util.cpp
diff options
context:
space:
mode:
author Bartosz Bialek <bartosz@haleytek.com> 2024-12-17 15:04:45 +0100
committer Daniel Norman <danielnorman@google.com> 2025-01-15 10:50:13 -0800
commit0e21beee93ab85a707c098c11dde65991132f793 (patch)
treef138876dd066bc3660e9bf28182d358313b032cd /libs/androidfw/Util.cpp
parentf52c4570bf78ad30613e06f20c86bd58a48d39e7 (diff)
Fix window token leak on multi-display targets
The DisplayManager.getDisplays() API might return a different number of displays depending on the calling UID. An inconsistent behavior could be observed when running CTS tests, where addWindowTokensForAllDisplays() and onRemoved() methods could be called with either SYSTEM_UID or SHELL_UID for the same service connection. This resulted in adding window tokens for more displays but removing for less, causing some window tokens to never be removed. The solution is to clear UID while calling DisplayManager.getDisplays() API. Bug: https://partnerissuetracker.corp.google.com/issues/383369807 Test: Run CTS tests that use UIAutomator/AccessibilityService and observe number of visible layers in SurfaceFlinger dumpsys (cherry picked from commit 6a434c0aaa4d12f2fe60aac5d5e795d4f6ef7562) (cherry picked from https://android-review.googlesource.com/q/commit:1f921398b0cfcc2746cbedde2829d33f97506285) Merged-In: I5f207ddd09fab8c269db03d9a6dc09fb1d4cce92 Change-Id: I5f207ddd09fab8c269db03d9a6dc09fb1d4cce92
Diffstat (limited to 'libs/androidfw/Util.cpp')
0 files changed, 0 insertions, 0 deletions