Release virtual display hwcId during vr mode transition.

When we recreate the display state during VR mode transition, we were not
previously releasing hwcId with vr hardware composer. That resulted in VR
using the only VirtualDisplay provided by vr_hwc during the first run.
Every subsequent run failed to allocate a new hwcId id.

This manifested itself when DON (device on) flow quickly kicked the device
into and out of VR mode. Normally the binding is cleaned up when java
frameworks destroy the VD upon exiting VR mode, but it does so with a
short delay to account for rapid in/out transition, during which the
hwcId was getting left behind.

Bug: 34281731
Test: Run VR app, launch 2D app in VirtualDisplay, see it on the screen.
Close VR app, exit to 2D mode, repeat and observe 2D app in VR again.

Change-Id: I8faabdcd3516190ad88d1361c468f7f472ead588
1 file changed