Make sideband stream handle validation configurable

Bug: 311341683
Test: VtsHalTvInputTargetTest
Change-Id: I3f4319793039cc1dce39ce4e6a31f4c5abdbb7e0
diff --git a/tv/input/aidl/vts/functional/VtsHalTvInputTargetTest.cpp b/tv/input/aidl/vts/functional/VtsHalTvInputTargetTest.cpp
index 746ae1e..7e095f1 100644
--- a/tv/input/aidl/vts/functional/VtsHalTvInputTargetTest.cpp
+++ b/tv/input/aidl/vts/functional/VtsHalTvInputTargetTest.cpp
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#define LOG_TAG "tv_input_aidl_hal_test"
+
 #include "VtsHalTvInputTargetTest.h"
 
 #include <android-base/properties.h>
@@ -181,7 +183,9 @@
             ALOGD("OpenAndCloseStreamTest: open stream, device_id=%d, stream_id=%d", device_id,
                   stream_id);
             ASSERT_TRUE(tv_input_->openStream(device_id, stream_id, &handle).isOk());
-            ASSERT_TRUE(isValidHandle(handle));
+            if (VERIFY_SIDEBAND_STREAM_HANDLE) {
+                ASSERT_TRUE(isValidHandle(handle));
+            }
 
             ALOGD("OpenAndCloseStreamTest: close stream, device_id=%d, stream_id=%d", device_id,
                   stream_id);
@@ -283,7 +287,9 @@
 
     ALOGD("OpenAnOpenedStreamsTest: open stream, device_id=%d, stream_id=%d", device_id, stream_id);
     ASSERT_TRUE(tv_input_->openStream(device_id, stream_id, &handle).isOk());
-    ASSERT_TRUE(isValidHandle(handle));
+    if (VERIFY_SIDEBAND_STREAM_HANDLE) {
+        ASSERT_TRUE(isValidHandle(handle));
+    }
 
     ALOGD("OpenAnOpenedStreamsTest: open stream, device_id=%d, stream_id=%d", device_id, stream_id);
     ASSERT_TRUE(tv_input_->openStream(device_id, stream_id, &handle).getServiceSpecificError() ==