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

Commit de90f671 authored by Jonathan Reichert's avatar Jonathan Reichert Committed by Automerger Merge Worker
Browse files

Merge "Fix SetCountryCode test when US is not supported" am: 2585f44a am:...

Merge "Fix SetCountryCode test when US is not supported" am: 2585f44a am: 931a68b2 am: b6deacd9

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1662343

Change-Id: Ic21d2b3131ad4e5b610835de4efa29a6e5baf00b
parents 565d1574 b6deacd9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@

#include "supplicant_hidl_call_util.h"
#include "supplicant_hidl_test_utils.h"
#include <cutils/properties.h>

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<char, PROPERTY_VALUE_MAX> 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);