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

Commit 7b55d44a authored by yomna's avatar yomna
Browse files

Mark cellular security transparency APIs optional

Bug: b/300159864 b/276752426
Test: m
Flag: exempt
Change-Id: I814d8162ade48559ea35c55ac54f55eaee279e11
parent f7391d5a
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
@@ -2447,9 +2447,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) {
@@ -2478,9 +2478,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();
@@ -2490,9 +2490,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
@@ -2531,9 +2531,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();
@@ -2543,9 +2543,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
@@ -2577,7 +2577,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}));
}
}