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

Commit 15668e34 authored by Zhang Yuan's avatar Zhang Yuan Committed by Automerger Merge Worker
Browse files

Add REQUEST_NOT_SUPPORTED and INVALID_ARGUMENTS to be allowed. am: 399c257e am: ccd929fd

parents fcc3b6f0 ccd929fd
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -595,12 +595,17 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
    if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error, {RadioError::SIM_ABSENT}));
    } else if (cardStatus.base.base.base.cardState == CardState::PRESENT) {
        // OPERATION_NOT_ALLOWED should not be allowed; however, some vendors do
        // not support the required manual GSM search functionality. This is
        // tracked in b/112206766. Modems have "GSM" rat scan need to
        // Modems have "GSM" rat scan need to
        // support scanning requests combined with some parameters.
        if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) {
            ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
                                         {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
        } else {
            ASSERT_TRUE(CheckAnyOfErrors(
                    radioRsp_v1_5->rspInfo.error,
                    {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED,
                     RadioError::REQUEST_NOT_SUPPORTED, RadioError::INVALID_ARGUMENTS}));
        }
    }

    if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
+9 −2
Original line number Diff line number Diff line
@@ -862,8 +862,15 @@ TEST_P(RadioNetworkTest, startNetworkScan) {
        // not support the required manual GSM search functionality. This is
        // tracked in b/112206766. Modems have "GSM" rat scan need to
        // support scanning requests combined with some parameters.
        if (deviceSupportsFeature(FEATURE_TELEPHONY_GSM)) {
            ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
                                         {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
        } else {
            ASSERT_TRUE(CheckAnyOfErrors(
                    radioRsp_network->rspInfo.error,
                    {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED, RadioError::NONE,
                     RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
        }
    }

    if (radioRsp_network->rspInfo.error == RadioError::NONE) {