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

Commit d4a8add7 authored by yomna's avatar yomna Committed by Yomna Nasser
Browse files

Check API values only if modem supports APIs

Bug: b/338173836
Test: m
Flag: exempt
Change-Id: Ia6471ac07d37ec9480b27de96241ccf0f8559e66
Merged-In: I62805cdf419553b468a04fe2af6ecbfd6cac810a
parent ec0c8a6e
Loading
Loading
Loading
Loading
+37 −32
Original line number Diff line number Diff line
@@ -2494,6 +2494,7 @@ TEST_P(RadioNetworkTest, setCellularIdentifierTransparencyEnabled) {
                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));

    if (radioRsp_network->rspInfo.error == RadioError::NONE) {
        // Assert the value has changed
        serial = GetRandomSerialNumber();
        ndk::ScopedAStatus res = radio_network->isCellularIdentifierTransparencyEnabled(serial);
@@ -2508,11 +2509,13 @@ TEST_P(RadioNetworkTest, setCellularIdentifierTransparencyEnabled) {
        EXPECT_EQ(valueToSet, radioRsp_network->isCellularIdentifierTransparencyEnabled);

        // Reset original state
    radio_network->setCellularIdentifierTransparencyEnabled(serial, originalTransparencySetting);
        radio_network->setCellularIdentifierTransparencyEnabled(serial,
                                                                originalTransparencySetting);
        EXPECT_EQ(std::cv_status::no_timeout, wait());
        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
        EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    }
}

/*
 * Test IRadioNetwork.setSecurityAlgorithmsUpdatedEnabled for the response returned.
@@ -2547,6 +2550,7 @@ TEST_P(RadioNetworkTest, setSecurityAlgorithmsUpdatedEnabled) {
                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));

    if (radioRsp_network->rspInfo.error == RadioError::NONE) {
        // Assert the value has changed
        serial = GetRandomSerialNumber();
        ndk::ScopedAStatus res = radio_network->isSecurityAlgorithmsUpdatedEnabled(serial);
@@ -2566,6 +2570,7 @@ TEST_P(RadioNetworkTest, setSecurityAlgorithmsUpdatedEnabled) {
        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
        EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    }
}

/**
 * Test IRadioNetwork.isSecurityAlgorithmsUpdatedEnabled for the response returned.