diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp index b9c7b30968..bd0e8cfe50 100644 --- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp +++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp @@ -26,6 +26,7 @@ #include "supplicant_hidl_call_util.h" #include "supplicant_hidl_test_utils.h" +#include using ::android::sp; using ::android::hardware::hidl_array; @@ -62,7 +63,7 @@ constexpr char kTestRadioWorkName[] = "TestRadioWork"; constexpr uint32_t kTestRadioWorkFrequency = 2412; constexpr uint32_t kTestRadioWorkTimeout = 8; constexpr uint32_t kTestRadioWorkId = 16; -constexpr int8_t kTestCountryCode[] = {'U', 'S'}; +int8_t kTestCountryCode[] = {'U', 'S'}; constexpr uint8_t kTestWpsDeviceType[] = {[0 ... 7] = 0x01}; constexpr uint16_t kTestWpsConfigMethods = 0xffff; } // namespace @@ -444,6 +445,10 @@ TEST_P(SupplicantStaIfaceHidlTest, SetSuspendModeEnabled) { * SetCountryCode. */ TEST_P(SupplicantStaIfaceHidlTest, SetCountryCode) { + std::array buffer; + property_get("ro.boot.wificountrycode", buffer.data(), "US"); + kTestCountryCode[0] = buffer.data()[0]; + kTestCountryCode[1] = buffer.data()[1]; sta_iface_->setCountryCode( kTestCountryCode, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);