Loading
Allow a primary display disconnect
This patch forwards the primary display disconnect event to the Framework, and otherwise ensures that SurfaceFlinger does not crash while there is no primary display. Note that the Framework does not yet accept this change. In particular the ActivityManager ActivityStackSupervisor code promptly asserts that one cannot remove the primary display. With this assertion disabled, the framework does not crash (surprisingly). And if the Framework subsequently receives a primary display connect event, it does not seem to do anything useful -- the display remains in a default off state, and no layer stack/viewport/etc is set on it. Bug: 38464421 Test: Works (with workarounds as noted) on a Chromebook Test: Added Unit test passes on Pixel 1 XL Change-Id: Ia11439030efdc53bc17474b71a0ffb3d3085bb49