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

Commit eddc6dc0 authored by liuxiangjun's avatar liuxiangjun Committed by Xiangjun Liu
Browse files

Return INVALID_ ARGUMENTS is the expected result



For devices not in LTE service, the vts test returns INVALID_ ARGUMENTS is an expected result

Bug:289756066

Test:
VtsHalRadioV1_5TargetTest  PerInstance/RadioHidlTest_v1_5#startNetworkScan/0_slot1
VtsHalRadioV1_5TargetTest  PerInstance/RadioHidlTest_v1_5#startNetworkScan/1_slot2

Change-Id: I873d51e089b27aa0cc0dc9f5f25fd8ffaa4d8f40
Signed-off-by: default avatarliuxiangjun <liuxiangjun3@xiaomi.com>
parent 3004ccf5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -138,3 +138,7 @@ std::cv_status RadioResponseWaiter::wait() {
    count_--;
    return status;
}

bool isLteConnected(){
    return testing::checkSubstringInCommandOutput("getprop gsm.network.type", "LTE");
}
+5 −0
Original line number Diff line number Diff line
@@ -104,6 +104,11 @@ bool isVoiceEmergencyOnly(RegState state);
 */
bool isVoiceInService(RegState state);

/*
 * Check if device is in Lte Connected status.
 */
bool isLteConnected();

/**
 * Used when waiting for an asynchronous response from the HAL.
 */
+1 −1
Original line number Diff line number Diff line
@@ -597,7 +597,7 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
    } else if (cardStatus.base.base.base.cardState == CardState::PRESENT) {
        // Modems support 3GPP RAT family need to
        // support scanning requests combined with some parameters.
        if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) {
        if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM) && isLteConnected()) {
            ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
                                         {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
        } else {
+4 −0
Original line number Diff line number Diff line
@@ -227,3 +227,7 @@ void RadioServiceTest::updateSimSlotStatus(int physicalSlotId) {
        slotStatus = radioConfigRsp->simSlotStatus[physicalSlotId];
    }
}

bool isLteConnected(){
    return testing::checkSubstringInCommandOutput("getprop gsm.network.type", "LTE");
}
+5 −0
Original line number Diff line number Diff line
@@ -128,6 +128,11 @@ bool isVoiceInService(RegState state);
 */
bool isServiceValidForDeviceConfiguration(std::string& serviceName);

/*
 * Check if device is in Lte Connected status.
 */
bool isLteConnected();

/**
 * RadioServiceTest base class
 */
Loading