Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbb24685 authored by Yixiao Luo's avatar Yixiao Luo
Browse files

Make sideband stream handle validation configurable

Bug: 311341683
Test: VtsHalTvInputTargetTest
Change-Id: I3f4319793039cc1dce39ce4e6a31f4c5abdbb7e0
parent 19f723c2
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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 @@ TEST_P(TvInputAidlTest, OpenAndCloseStreamTest) {
            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());
            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 @@ TEST_P(TvInputAidlTest, OpenAnOpenedStreamsTest) {

    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());
    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() ==
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ using ::android::AidlMessageQueue;

#define WAIT_FOR_EVENT_TIMEOUT 5
#define DEFAULT_ID INT32_MIN
#define VERIFY_SIDEBAND_STREAM_HANDLE 1

namespace VtsHalTvInputTargetTest {