Fix VrFlinger handoff
In ag/3368932, hotplug processing was moved to main thread and deferred
the actual display devices creation to the next cycle of
SurfaceFlinger's main thread. This breaks UpdateVrFlinger logic, which
runs on the main thread and assumes all new display devices get created
synchronously during the handoff.
This CL fixes the issue by allowing synchronous calling
processDisplayHotplugEventsLocked() from onHotplugReceived() if and only
if the callback is called on main thread.
Bug: 72103899
Test: VrApp now renders fine
Change-Id: I2abd5d5861e0bb74419f12142f7f7c33190a022c
1 file changed