Fix frozen screen after exiting vr
When a hotplug connected event occurs, don't recreate any already-existing entries in mBuiltinDisplays. This fixes a problem where the screen would freeze after exiting vr. In the future, we may want to use hotplug connected events to notify surface flinger to reinitialize display state. This CL includes a change to the code in HWC2.cpp to always reinitialize the display state when we get a hotplug connected event, even if the display is already connected. Bug: 74985350 Test: - Confirmed exiting vr no longer freezes the screen. - Added code to simulate a hotplug connected event while the device is running, to test the changes in HWC2.cpp. Confirmed the device continued to function normally. Change-Id: I6afda67cae84842b2568c773e6b5aa4f38df6a96
Loading
Please register or sign in to comment