WIP: Fix segfault after Unplug event for disconnected displays
On Android 10, after pressing the power button to turn off the display, hwcomposer
send a hotplug
event to turn off the display. The power button could be pressed again to wake up the display, but on some displays, after pressing the power button, hwcomposer
send a unplug event when the display is still off, after which a segmentation fault occurs in SurfaceFlinger
.
This patch added a display connection check and does not call the HandleDisplayHotplug()
function, which dispatches an hotplug event when the display is disabled.