Unlocking getDisplayByUserIdAndWindowId
The above function calls a synchronized function in a different service, which can cause an ANR when that service is slow to respond.
This change restructures the function to only apply a lock to the portion that does not call out to the other service.
Logic that should be synchronized will remain so, but this should prevent needlessly holding onto the lock.
Bug: 327710829
Test: atest AbstractAccessibilityServiceConnectionTest
Flag: N/A
Change-Id: I68f005e48660a70a9272bbf873020118ac898e82
4 files changed