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

Commit 995f2b8e authored by Yuyang Huang's avatar Yuyang Huang Committed by Automerger Merge Worker
Browse files

Merge "Update APF VTS to include the vendor API level check" into udc-dev am: 51d7c995

parents b8ee8e5e 51d7c995
Loading
Loading
Loading
Loading
+18 −10
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@
#include <android/binder_status.h>
#include <android/binder_status.h>
#include <binder/IServiceManager.h>
#include <binder/IServiceManager.h>
#include <binder/ProcessState.h>
#include <binder/ProcessState.h>
#include <cutils/properties.h>


#include "wifi_aidl_test_utils.h"
#include "wifi_aidl_test_utils.h"


@@ -98,9 +99,15 @@ TEST_P(WifiStaIfaceAidlTest, GetFeatureSet) {
 */
 */
// @VsrTest = 5.3.12
// @VsrTest = 5.3.12
TEST_P(WifiStaIfaceAidlTest, CheckApfIsSupported) {
TEST_P(WifiStaIfaceAidlTest, CheckApfIsSupported) {
    // It is not required to check the vendor API level is at least U here
    int vendor_api_level = property_get_int32("ro.vendor.api_level", 0);
    // because the Wi-Fi AIDL interface is launched with Android U(VSR-14).
    // Before VSR 14, APF support is optional.
    // TODO: Add wavier list to the chipsets that doesn't support APF.
    if (vendor_api_level < __ANDROID_API_U__) {
        if (!isFeatureSupported(IWifiStaIface::FeatureSetMask::APF)) {
            GTEST_SKIP() << "APF packet filter capabilities are not supported.";
        }
        StaApfPacketFilterCapabilities apf_caps = {};
        EXPECT_TRUE(wifi_sta_iface_->getApfPacketFilterCapabilities(&apf_caps).isOk());
    } else {
        EXPECT_TRUE(isFeatureSupported(IWifiStaIface::FeatureSetMask::APF));
        EXPECT_TRUE(isFeatureSupported(IWifiStaIface::FeatureSetMask::APF));
        StaApfPacketFilterCapabilities apf_caps = {};
        StaApfPacketFilterCapabilities apf_caps = {};
        EXPECT_TRUE(wifi_sta_iface_->getApfPacketFilterCapabilities(&apf_caps).isOk());
        EXPECT_TRUE(wifi_sta_iface_->getApfPacketFilterCapabilities(&apf_caps).isOk());
@@ -109,6 +116,7 @@ TEST_P(WifiStaIfaceAidlTest, CheckApfIsSupported) {
        EXPECT_EQ(apf_caps.version, 4);
        EXPECT_EQ(apf_caps.version, 4);
        EXPECT_GE(apf_caps.maxLength, 1024);
        EXPECT_GE(apf_caps.maxLength, 1024);
    }
    }
}


/*
/*
 * GetBackgroundScanCapabilities
 * GetBackgroundScanCapabilities