diff --git a/tv/tuner/aidl/vts/functional/FilterTests.cpp b/tv/tuner/aidl/vts/functional/FilterTests.cpp index 53afef731a..533d0e6782 100644 --- a/tv/tuner/aidl/vts/functional/FilterTests.cpp +++ b/tv/tuner/aidl/vts/functional/FilterTests.cpp @@ -305,13 +305,18 @@ AssertionResult FilterTests::configureMonitorEvent(int64_t filterId, int32_t mon ndk::ScopedAStatus status; status = mFilters[filterId]->configureMonitorEvent(monitorEventTypes); + return AssertionResult(status.isOk()); +} + +AssertionResult FilterTests::testMonitorEvent(uint64_t filterId, uint32_t monitorEventTypes) { + EXPECT_TRUE(mFilterCallbacks[filterId]) << "Test with getNewlyOpenedFilterId first."; if (monitorEventTypes & static_cast(DemuxFilterMonitorEventType::SCRAMBLING_STATUS)) { mFilterCallbacks[filterId]->testFilterScramblingEvent(); } if (monitorEventTypes & static_cast(DemuxFilterMonitorEventType::IP_CID_CHANGE)) { mFilterCallbacks[filterId]->testFilterIpCidEvent(); } - return AssertionResult(status.isOk()); + return AssertionResult(true); } AssertionResult FilterTests::startIdTest(int64_t filterId) { diff --git a/tv/tuner/aidl/vts/functional/FilterTests.h b/tv/tuner/aidl/vts/functional/FilterTests.h index f579441d4f..f57093ebb4 100644 --- a/tv/tuner/aidl/vts/functional/FilterTests.h +++ b/tv/tuner/aidl/vts/functional/FilterTests.h @@ -124,6 +124,7 @@ class FilterTests { AssertionResult configAvFilterStreamType(AvStreamType type, int64_t filterId); AssertionResult configIpFilterCid(int32_t ipCid, int64_t filterId); AssertionResult configureMonitorEvent(int64_t filterId, int32_t monitorEventTypes); + AssertionResult testMonitorEvent(uint64_t filterId, uint32_t monitorEventTypes); AssertionResult getFilterMQDescriptor(int64_t filterId, bool getMqDesc); AssertionResult startFilter(int64_t filterId); AssertionResult stopFilter(int64_t filterId); diff --git a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp index 9db82c893d..3664b6cfdf 100644 --- a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp +++ b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp @@ -60,6 +60,11 @@ void TunerFilterAidlTest::configSingleFilterInDemuxTest(FilterConfig filterConf, } ASSERT_TRUE(mFilterTests.getFilterMQDescriptor(filterId, filterConf.getMqDesc)); ASSERT_TRUE(mFilterTests.startFilter(filterId)); + ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/)); + if (filterConf.monitorEventTypes > 0) { + ASSERT_TRUE(mFilterTests.testMonitorEvent(filterId, filterConf.monitorEventTypes)); + } + ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/)); ASSERT_TRUE(mFilterTests.stopFilter(filterId)); ASSERT_TRUE(mFilterTests.closeFilter(filterId)); ASSERT_TRUE(mDemuxTests.closeDemux());