hqd: Do not process WFD teardown as part of HDMI connection

WFD teardown was required when HDMI is connected on V4L2
architecture. This is because WFD connection is using HDMI
piggyback connection. Since SurfaceFlinger can honour only
one active external display, we have to teardown WFD
connection to process HDMI connection.

This is no longer applicable on VDS architecture. WFD connection
is established using Virtual Display adapter.
WFD Stack listen to HDMI broadcast event and initiate wfd teardown.

Change-Id: Iaca249f4f45193f02d32ac0ab56d68ce85e8c9a3
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 3d3d138..28fcea3 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -226,8 +226,7 @@
     }
 
     ctx->mAD->reset();
-    if(ctx->mHWCVirtual)
-        ctx->mHWCVirtual->destroy(ctx, numDisplays, displays);
+
 }
 
 static void scaleDisplayFrame(hwc_context_t *ctx, int dpy,
@@ -367,6 +366,11 @@
     ctx->mOverlay->configDone();
     ctx->mRotMgr->configDone();
     overlay::Writeback::configDone();
+    // If VD list is deleted, mdp overlay pipe objects and writeback object
+    // are deleted as part of configDone functions.
+    // Proceed with HWCVirtualVDS object deletion.
+    if(ctx->mHWCVirtual)
+        ctx->mHWCVirtual->destroy(ctx, numDisplays, displays);
 
     return ret;
 }