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

Skip to content
Commit 594db036 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski
Browse files

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
parent 67e5e61c
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