Fix the VDM<->WM deadlock when creating a display.
VirtualDeviceImpl holds its lock when calling DisplayManagerService#createVirtualDisplay, which calls into WM for the DisplayWindowSettings logic, which locks the global WM lock. On a separate path, when WM detects a new display, while holding its global WM lock, it calls into VDM to check if a virtual device is the owner of the new display, which locks the VirtualDeviceImpl lock. Solution: - Do not hold the VD lock when calling createVirtualDisplay. - Still, the VD needs to be notified when the display is created before any other display listeners know about that display. - It's actually very similar to the existing onVirtualDisplayRemoved call from DMS Fix: 380339391 Test: presubmut Flag: EXEMPT bugfix Change-Id: Ie41d59534cecb1057b6d51496fcd884e5c3bff0f
Loading
Please register or sign in to comment