Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6a434c0a authored by Bartosz Bialek's avatar Bartosz Bialek
Browse files

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
Change-Id: I5f207ddd09fab8c269db03d9a6dc09fb1d4cce92
parent 978dbf9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment