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

Commit 5d372032 authored by Sarah Chin's avatar Sarah Chin Committed by Android (Google) Code Review
Browse files

Merge changes from topics "nr_band", "nw_sel"

* changes:
  Manual network selection by RAN type
  Added NR band support
parents 15d56e77 3efba537
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -667,10 +667,10 @@ def77c7db95d374f11a111bfc4ed60f92451303642a43276c4e291988fcee625 android.hardwar
##
# BEGIN Radio HAL Merge Conflict Avoidance Buffer - STOPSHIP if present
##
b48e25c1b90da7a011ccfd76d9e551c105783ef2b9fea4921d4fc5978b215e98 android.hardware.radio@1.5::types
6268d208631b21d1e85bfad338642ac5ca7ac6c83b411283515a4342b5d673f7 android.hardware.radio@1.5::IRadio
616456d7ce4435d88995f9fe0025a76bca14bd70799e4ca3ff4bae74d54d1166 android.hardware.radio@1.5::types
c68f5bd87f747f8e7968ff66ecc548b2d26f8e186b7bb805c11d6c883a838fc6 android.hardware.radio@1.5::IRadio
e96ae1c3a9c0689002ec2318e9c587f4f607c16a75a3cd38788b77eb91072021 android.hardware.radio@1.5::IRadioIndication
64e06cd5251bec38c402f71d05a6d52b89819a20c9099a192a694059ce4336fc android.hardware.radio@1.5::IRadioResponse
9e962eff568dc8c712d83846f8c27460de5005ed9b836d3e08390e8aa56b5a46 android.hardware.radio@1.5::IRadioResponse
5971a891d7d8843e9fb9f44583a9a0a265ec42fd5e4e1c95c9803454d21fabf7 android.hardware.radio.config@1.3::types
a2977755bc5f1ef47f04b7f2400632efda6218e1515dba847da487145cfabc4f android.hardware.radio.config@1.3::IRadioConfig
742360c775313438b0f82256eac62fb5bbc76a6ae6f388573f3aa142fb2c1eea android.hardware.radio.config@1.3::IRadioConfigIndication
+19 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import @1.5::DataProfileInfo;
import @1.5::IndicationFilter;
import @1.5::LinkAddress;
import @1.5::NetworkScanRequest;
import @1.5::RadioAccessNetworks;
import @1.5::RadioAccessSpecifier;
import @1.5::SignalThresholdInfo;

@@ -263,4 +264,22 @@ interface IRadio extends @1.4::IRadio {
     * Response function is IRadioResponse.getDataRegistrationStateResponse_1_5()
     */
    oneway getDataRegistrationState_1_5(int32_t serial);

    /*
     * Manually select a specified network.
     * This request must not respond until the new operator is selected and registered.
     * Per TS 23.122, the RAN is just the initial suggested value.
     * If registration fails, the RAN is not available afterwards, or the RAN is not within
     * the network types specified by IRadio::setPreferredNetworkTypeBitmap, then the modem
     * will need to select the next best RAN for network registration.
     *
     * @param serial Serial number of request.
     * @param operatorNumeric String specifying MCCMNC of network to select (eg "310170").
     * @param ran Initial suggested radio access network type. If value is UNKNOWN, the modem
     *     will select the next best RAN for network registration.
     *
     * Response function is IRadioResponse.setNetworkSelectionModeManualResponse_1_5()
     */
    oneway setNetworkSelectionModeManual_1_5(int32_t serial, string operatorNumeric,
            RadioAccessNetworks ran);
};
+24 −0
Original line number Diff line number Diff line
@@ -212,4 +212,28 @@ interface IRadioResponse extends @1.4::IRadioResponse {
     *   RadioError:INTERNAL_ERR
     */
    oneway getCellInfoListResponse_1_5(RadioResponseInfo info, vec<CellInfo> cellInfo);


    /**
     * @param info Response info struct containing response type, serial no. and error
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:ILLEGAL_SIM_OR_ME
     *   RadioError:OPERATION_NOT_ALLOWED
     *   RadioError:INVALID_STATE
     *   RadioError:NO_MEMORY
     *   RadioError:INTERNAL_ERR
     *   RadioError:SYSTEM_ERR
     *   RadioError:INVALID_ARGUMENTS
     *   RadioError:MODEM_ERR
     *   RadioError:REQUEST_NOT_SUPPORTED
     *   RadioError:NO_RESOURCES
     *   RadioError:CANCELLED
     *
     * Returns RadioError:ILLEGAL_SIM_OR_ME when the failure is permanent and
     * no retries needed, such as illegal SIM or ME.
     */
    oneway setNetworkSelectionModeManualResponse_1_5(RadioResponseInfo info);
};
+7 −0
Original line number Diff line number Diff line
@@ -166,7 +166,11 @@ enum AccessNetwork : @1.4::AccessNetwork {
};

enum RadioAccessNetworks : @1.1::RadioAccessNetworks {
    UNKNOWN = 0,
    /** Next Generation Radio Access Network */
    NGRAN = 4,
    /** CDMA 2000 Network */
    CDMA2000 = 5,
};

/**
@@ -610,6 +614,9 @@ struct CellIdentityNr {

    /** Additional PLMN-IDs beyond the primary PLMN broadcast for this cell */
    vec<string> additionalPlmns;

    /** Band used by the cell */
    NgranBands band;
};

struct CellInfoGsm {
+33 −1
Original line number Diff line number Diff line
@@ -879,6 +879,9 @@ TEST_F(RadioHidlTest_v1_5, setupDataCall_1_5) {
    }
}

/*
 * Test IRadio.setInitialAttachApn_1_5() for the response returned.
 */
TEST_F(RadioHidlTest_v1_5, setInitialAttachApn_1_5) {
    serial = GetRandomSerialNumber();

@@ -919,6 +922,9 @@ TEST_F(RadioHidlTest_v1_5, setInitialAttachApn_1_5) {
    }
}

/*
 * Test IRadio.setDataProfile_1_5() for the response returned.
 */
TEST_F(RadioHidlTest_v1_5, setDataProfile_1_5) {
    serial = GetRandomSerialNumber();

@@ -990,3 +996,29 @@ TEST_F(RadioHidlTest_v1_5, setRadioPower_1_5_emergencyCall_cancalled) {
    EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
    EXPECT_EQ(RadioError::NONE, radioRsp_v1_5->rspInfo.error);
}

/*
 * Test IRadio.setNetworkSelectionModeManual_1_5() for the response returned.
 */
TEST_F(RadioHidlTest_v1_5, setNetworkSelectionModeManual_1_5) {
    serial = GetRandomSerialNumber();

    // can't camp on nonexistent MCCMNC, so we expect this to fail.
    Return<void> res = radio_v1_5->setNetworkSelectionModeManual_1_5(
            serial, "123456", android::hardware::radio::V1_5::RadioAccessNetworks::GERAN);
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);

    if (cardStatus.base.base.cardState == CardState::ABSENT) {
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
                                     {RadioError::NONE, RadioError::ILLEGAL_SIM_OR_ME,
                                      RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
                                     CHECK_GENERAL_ERROR));
    } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
                                     {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
                                      RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
                                     CHECK_GENERAL_ERROR));
    }
}
Loading