From f91d7adfc4d118e3f9b9f3cb2d7043863b41d5f1 Mon Sep 17 00:00:00 2001 From: Andres Schafhauser Date: Wed, 10 Jan 2024 12:20:09 -0800 Subject: [PATCH] APF exempt list for TVs to use hardware feature Instead of expecting MdnsOffloadManagerService to exist which is correct in principle but VTS fails as use of GSI is required. Bug: 318332352 Test: atest VtsHalWifiStaIfaceTargetTest Change-Id: I47453e7ad009b08aadf7c09fc144d2166ef9991b --- .../vts/functional/wifi_sta_iface_aidl_test.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp index 1ea1237a2d..f09a26bbe6 100644 --- a/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp +++ b/wifi/aidl/vts/functional/wifi_sta_iface_aidl_test.cpp @@ -69,18 +69,9 @@ class WifiStaIfaceAidlTest : public testing::TestWithParam { std::shared_ptr wifi_sta_iface_; - // Checks if the MdnsOffloadManagerService is installed. - bool isMdnsOffloadServicePresent() { - int status = - // --query-flags MATCH_SYSTEM_ONLY(1048576) will only return matched service - // installed on system or system_ext partition. The MdnsOffloadManagerService should - // be installed on system_ext partition. - // NOLINTNEXTLINE(cert-env33-c) - system("pm query-services --query-flags 1048576" - " com.android.tv.mdnsoffloadmanager/" - "com.android.tv.mdnsoffloadmanager.MdnsOffloadManagerService" - " | egrep -q mdnsoffloadmanager"); - return status == 0; + // Checks if the mDNS Offload is supported by any NIC. + bool isMdnsOffloadPresentInNIC() { + return testing::deviceSupportsFeature("android.hardware.mdns_offload"); } // Detected panel TV device by using ro.oem.key1 property. @@ -146,7 +137,7 @@ TEST_P(WifiStaIfaceAidlTest, GetFeatureSet) { TEST_P(WifiStaIfaceAidlTest, CheckApfIsSupported) { // Flat panel TV devices that support MDNS offload do not have to implement APF if the WiFi // chipset does not have sufficient RAM to do so. - if (isPanelTvDevice() && isMdnsOffloadServicePresent()) { + if (isPanelTvDevice() && isMdnsOffloadPresentInNIC()) { GTEST_SKIP() << "Panel TV supports mDNS offload. It is not required to support APF"; } int vendor_api_level = property_get_int32("ro.vendor.api_level", 0);