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_virtual.cpp b/libhwcomposer/hwc_virtual.cpp
index db43435..34fe7d3 100644
--- a/libhwcomposer/hwc_virtual.cpp
+++ b/libhwcomposer/hwc_virtual.cpp
@@ -88,11 +88,7 @@
             delete ctx->mMDPComp[dpy];
             ctx->mMDPComp[dpy] = NULL;
         }
-        // We reset the WB session to non-secure when the virtual display
-        // has been disconnected.
-        if(!Writeback::getInstance()->setSecure(false)) {
-            ALOGE("Failure while attempting to reset WB session.");
-        }
+        // signal synclock to indicate successful wfd teardown
         ctx->mWfdSyncLock.lock();
         ctx->mWfdSyncLock.signal();
         ctx->mWfdSyncLock.unlock();
@@ -177,13 +173,12 @@
             Writeback::getInstance()->setOutputFormat(
                                     utils::getMdpFormat(format));
 
-            // Configure WB as secure if the output buffer handle is secure.
-            if(isSecureBuffer(ohnd)){
-                if(! Writeback::getInstance()->setSecure(true))
-                {
-                    ALOGE("Failed to set WB as secure for virtual display");
-                    return false;
-                }
+            // Configure WB secure mode based on output buffer handle
+            if(! Writeback::getInstance()->setSecure(isSecureBuffer(ohnd)))
+            {
+                ALOGE("Failed to set WB secure mode: %d for virtual display",
+                    isSecureBuffer(ohnd));
+                return false;
             }
 
             int fd = -1; //FenceFD from the Copybit