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

Commit a95aa0fe authored by Yomna Nasser's avatar Yomna Nasser Committed by Gerrit Code Review
Browse files

Merge "Mark cellular security transparency APIs optional" into main

parents 64b1d27a 7b55d44a
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -747,6 +747,7 @@ oneway interface IRadioNetworkResponse {


    /**
    /**
     * Response of isCellularIdentifierTransparencyEnabled.
     * Response of isCellularIdentifierTransparencyEnabled.
     * This is an optional API.
     *
     *
     * @param info Response info struct containing response type, serial no. and error.
     * @param info Response info struct containing response type, serial no. and error.
     * @param isEnabled Indicates whether cellular identifier transparency is enabled or not.
     * @param isEnabled Indicates whether cellular identifier transparency is enabled or not.
@@ -757,12 +758,14 @@ oneway interface IRadioNetworkResponse {
     *   RadioError:NONE
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:INTERNAL_ERR
     *   RadioError:INTERNAL_ERR
     *   RadioError:REQUEST_NOT_SUPPORTED
     */
     */
    void isCellularIdentifierTransparencyEnabledResponse(
    void isCellularIdentifierTransparencyEnabledResponse(
            in RadioResponseInfo info, boolean isEnabled);
            in RadioResponseInfo info, boolean isEnabled);


    /**
    /**
     * Response of setCellularIdentifierTransparencyEnabled.
     * Response of setCellularIdentifierTransparencyEnabled.
     * This is an optional API.
     *
     *
     * @param info Response info struct containing response type, serial no. and error.
     * @param info Response info struct containing response type, serial no. and error.
     *
     *
@@ -773,11 +776,13 @@ oneway interface IRadioNetworkResponse {
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:INTERNAL_ERR
     *   RadioError:INTERNAL_ERR
     *   RadioError:INVALID_STATE
     *   RadioError:INVALID_STATE
     *   RadioError:REQUEST_NOT_SUPPORTED
     */
     */
    void setCellularIdentifierTransparencyEnabledResponse(in RadioResponseInfo info);
    void setCellularIdentifierTransparencyEnabledResponse(in RadioResponseInfo info);


    /**
    /**
     * Response of setSecurityAlgorithmsUpdatedEnabled.
     * Response of setSecurityAlgorithmsUpdatedEnabled.
     * This is an optional API.
     *
     *
     * @param info Response info struct containing response type, serial no. and error.
     * @param info Response info struct containing response type, serial no. and error.
     *
     *
@@ -788,11 +793,13 @@ oneway interface IRadioNetworkResponse {
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:INTERNAL_ERR
     *   RadioError:INTERNAL_ERR
     *   RadioError:INVALID_STATE
     *   RadioError:INVALID_STATE
     *   RadioError:REQUEST_NOT_SUPPORTED
     */
     */
    void setSecurityAlgorithmsUpdatedEnabledResponse(in RadioResponseInfo info);
    void setSecurityAlgorithmsUpdatedEnabledResponse(in RadioResponseInfo info);


    /**
    /**
     * Response of isSecurityAlgorithmsUpdatedEnabled.
     * Response of isSecurityAlgorithmsUpdatedEnabled.
     * This is an optional API.
     *
     *
     * @param info Response info struct containing response type, serial no. and error.
     * @param info Response info struct containing response type, serial no. and error.
     * @param isEnabled Indicates whether cellular ciphering transparency is enabled or not.
     * @param isEnabled Indicates whether cellular ciphering transparency is enabled or not.
@@ -803,6 +810,7 @@ oneway interface IRadioNetworkResponse {
     *   RadioError:NONE
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:INTERNAL_ERR
     *   RadioError:INTERNAL_ERR
     *   RadioError:REQUEST_NOT_SUPPORTED
     */
     */
    void isSecurityAlgorithmsUpdatedEnabledResponse(
    void isSecurityAlgorithmsUpdatedEnabledResponse(
            in RadioResponseInfo info, in boolean isEnabled);
            in RadioResponseInfo info, in boolean isEnabled);
+18 −18
Original line number Original line Diff line number Diff line
@@ -2471,9 +2471,9 @@ TEST_P(RadioNetworkTest, isCellularIdentifierTransparencyEnabled) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);


    ASSERT_TRUE(CheckAnyOfErrors(
    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
            radioRsp_network->rspInfo.error,
                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
}
}


TEST_P(RadioNetworkTest, setCellularIdentifierTransparencyEnabled) {
TEST_P(RadioNetworkTest, setCellularIdentifierTransparencyEnabled) {
@@ -2502,9 +2502,9 @@ TEST_P(RadioNetworkTest, setCellularIdentifierTransparencyEnabled) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);


    ASSERT_TRUE(CheckAnyOfErrors(
    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
            radioRsp_network->rspInfo.error,
                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));


    // Assert the value has changed
    // Assert the value has changed
    serial = GetRandomSerialNumber();
    serial = GetRandomSerialNumber();
@@ -2514,9 +2514,9 @@ TEST_P(RadioNetworkTest, setCellularIdentifierTransparencyEnabled) {
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    ASSERT_TRUE(CheckAnyOfErrors(
    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
            radioRsp_network->rspInfo.error,
                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
    EXPECT_EQ(valueToSet, radioRsp_network->isCellularIdentifierTransparencyEnabled);
    EXPECT_EQ(valueToSet, radioRsp_network->isCellularIdentifierTransparencyEnabled);


    // Reset original state
    // Reset original state
@@ -2555,9 +2555,9 @@ TEST_P(RadioNetworkTest, setSecurityAlgorithmsUpdatedEnabled) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);


    ASSERT_TRUE(CheckAnyOfErrors(
    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
            radioRsp_network->rspInfo.error,
                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));


    // Assert the value has changed
    // Assert the value has changed
    serial = GetRandomSerialNumber();
    serial = GetRandomSerialNumber();
@@ -2567,9 +2567,9 @@ TEST_P(RadioNetworkTest, setSecurityAlgorithmsUpdatedEnabled) {
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    ASSERT_TRUE(CheckAnyOfErrors(
    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
            radioRsp_network->rspInfo.error,
                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
    EXPECT_EQ(valueToSet, radioRsp_network->isSecurityAlgorithmsUpdatedEnabled);
    EXPECT_EQ(valueToSet, radioRsp_network->isSecurityAlgorithmsUpdatedEnabled);


    // Reset original state
    // Reset original state
@@ -2601,7 +2601,7 @@ TEST_P(RadioNetworkTest, isSecurityAlgorithmsUpdatedEnabled) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);


    ASSERT_TRUE(CheckAnyOfErrors(
    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
            radioRsp_network->rspInfo.error,
                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
}
}