summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Antony Sargent <asargent@google.com> 2022-05-09 16:12:35 -0700
committer Antony Sargent <asargent@google.com> 2022-05-29 11:18:36 -0700
commit725dad7d717fc641d3ee3adb782270b82ee92cd8 (patch)
tree6d9824bb60be406b69eeac34c532aca12f020cf2 /libs/androidfw/StringPool.cpp
parent0bdc2763a9ebb6b3449913a3982405ef36e16485 (diff)
Prevent deadlocks during VirtualDisplay creation
When creating a VirtualDisplay for a VirtualDevice, we need to do some extra work like setting up for input injection, creating a DisplayWindowPolicyController, and grabbing a wakelock to keep the display awake. Some parts of this extra work end up calling back into the DisplayManagerService from another thread, but since we're already holding the mSyncRoot lock we sometimes get into situations where those threads get blocked trying to acquire mSyncRoot, while holding a lock that another thread ends up needing like the global window manager one, so we get deadlock. The fix in this CL is to break up the extra work the VirtualDeviceManagerService needs to do into two parts: one part that happens before the VirtualDisplay is created, and one part after. Neither of these needs mSyncRoot to be held. Fixes: 230544802 Test: atest CreateVirtualDisplayTest Change-Id: I6a6e03f816567579510b3f1ef0705375549a3c88
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions