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

Commit fcf5cf3d authored by Aishwarya Mallampati's avatar Aishwarya Mallampati Committed by Android (Google) Code Review
Browse files

Merge changes from topic "388346813" into main

* changes:
  Remove sim slot input param from impl
  Remove sim slot input param from satellite HAL APIs.
parents c6c39a55 ee15c6e2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ interface IRadioNetwork {
  oneway void setCellularIdentifierTransparencyEnabled(in int serial, in boolean enabled);
  oneway void setSecurityAlgorithmsUpdatedEnabled(in int serial, boolean enable);
  oneway void isSecurityAlgorithmsUpdatedEnabled(in int serial);
  oneway void setSatellitePlmn(in int serial, in int simSlot, in String[] carrierPlmnArray, in String[] allSatellitePlmnArray);
  oneway void setSatelliteEnabledForCarrier(in int serial, in int simSlot, boolean satelliteEnabled);
  oneway void isSatelliteEnabledForCarrier(in int serial, in int simSlot);
  oneway void setSatellitePlmn(in int serial, in String[] carrierPlmnArray, in String[] allSatellitePlmnArray);
  oneway void setSatelliteEnabledForCarrier(in int serial, boolean satelliteEnabled);
  oneway void isSatelliteEnabledForCarrier(in int serial);
}
+4 −9
Original line number Diff line number Diff line
@@ -734,8 +734,6 @@ oneway interface IRadioNetwork {
     * satellite LTE service.
     *
     * @param serial Serial number of request
     * @param simSlot Indicates the SIM slot to which this API will be applied. The modem will use
     *                this information to determine the relevant carrier.
     * @param carrierPlmnArray Array of roaming PLMN used for connecting to satellite networks
     *                         supported by user subscription.
     * @param allSatellitePlmnArray allSatellitePlmnArray contains all the PLMNs present in
@@ -749,8 +747,8 @@ oneway interface IRadioNetwork {
     *
     * This is available when android.hardware.telephony.radio.access is defined.
     */
    void setSatellitePlmn(in int serial, in int simSlot, in String[] carrierPlmnArray,
            in String[] allSatellitePlmnArray);
    void setSatellitePlmn(
            in int serial, in String[] carrierPlmnArray, in String[] allSatellitePlmnArray);

    /**
     * Enable or disable satellite in the cellular modem associated with a carrier.
@@ -760,25 +758,22 @@ oneway interface IRadioNetwork {
     * If modem is enabled, modem should attach to only PLMNs present in carrierPlmnArray.
     *
     * @param serial Serial number of request
     * @param simSlot Indicates the SIM slot to which this API will be applied. The modem will use
     *                this information to determine the relevant carrier.
     * @param satelliteEnabled {@code true} to enable satellite, {@code false} to disable satellite.
     *
     * Response function is IRadioNetworkResponse.setSatelliteEnabledForCarrier()
     *
     * This is available when android.hardware.telephony.radio.access is defined.
     */
    void setSatelliteEnabledForCarrier(in int serial, in int simSlot, boolean satelliteEnabled);
    void setSatelliteEnabledForCarrier(in int serial, boolean satelliteEnabled);

    /**
     * Check whether satellite is enabled in the cellular modem associated with a carrier.
     *
     * @param serial Serial number of request
     * @param simSlot Indicates the SIM slot to which this API will be applied.
     *
     * Response function is IRadioNetworkResponse.isSatelliteEnabledForCarrier()
     *
     * This is available when android.hardware.telephony.radio.access is defined.
     */
    void isSatelliteEnabledForCarrier(in int serial, in int simSlot);
    void isSatelliteEnabledForCarrier(in int serial);
}
+3 −3
Original line number Diff line number Diff line
@@ -115,11 +115,11 @@ class RadioNetwork : public RadioCompatBase,
    ::ndk::ScopedAStatus isSecurityAlgorithmsUpdatedEnabled(int32_t serial) override;

    ::ndk::ScopedAStatus setSatellitePlmn(
            int32_t serial, int32_t simSlot, const std::vector<std::string>& carrierPlmnArray,
            int32_t serial, const std::vector<std::string>& carrierPlmnArray,
            const std::vector<std::string>& allSatellitePlmnArray) override;
    ::ndk::ScopedAStatus setSatelliteEnabledForCarrier(int32_t serial, int32_t simSlot,
    ::ndk::ScopedAStatus setSatelliteEnabledForCarrier(int32_t serial,
                                                       bool satelliteEnabled) override;
    ::ndk::ScopedAStatus isSatelliteEnabledForCarrier(int32_t serial, int32_t simSlot) override;
    ::ndk::ScopedAStatus isSatelliteEnabledForCarrier(int32_t serial) override;

  protected:
    std::shared_ptr<::aidl::android::hardware::radio::network::IRadioNetworkResponse> respond();
+3 −4
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ ScopedAStatus RadioNetwork::setSecurityAlgorithmsUpdatedEnabled(int32_t serial,
}

ScopedAStatus RadioNetwork::setSatellitePlmn(
        int32_t serial, int32_t /*simSlot*/, const std::vector<std::string>& /*carrierPlmnArray*/,
        int32_t serial, const std::vector<std::string>& /*carrierPlmnArray*/,
        const std::vector<std::string>& /*allSatellitePlmnArray*/) {
    LOG_CALL << serial;
    LOG(ERROR) << " setSatellitePlmn is unsupported by HIDL HALs";
@@ -411,15 +411,14 @@ ScopedAStatus RadioNetwork::setSatellitePlmn(
    return ok();
}

ScopedAStatus RadioNetwork::setSatelliteEnabledForCarrier(int32_t serial, int32_t /*simSlot*/,
                                                          bool /*enable*/) {
ScopedAStatus RadioNetwork::setSatelliteEnabledForCarrier(int32_t serial, bool /*enable*/) {
    LOG_CALL << serial;
    LOG(ERROR) << " setSatelliteEnabledForCarrier is unsupported by HIDL HALs";
    respond()->setSatelliteEnabledForCarrierResponse(notSupported(serial));
    return ok();
}

ScopedAStatus RadioNetwork::isSatelliteEnabledForCarrier(int32_t serial, int32_t /*simSlot*/) {
ScopedAStatus RadioNetwork::isSatelliteEnabledForCarrier(int32_t serial) {
    LOG_CALL << serial;
    LOG(ERROR) << " isSatelliteEnabledForCarrier is unsupported by HIDL HALs";
    respond()->isSatelliteEnabledForCarrierResponse(notSupported(serial), false);
+5 −5
Original line number Diff line number Diff line
@@ -2629,7 +2629,7 @@ TEST_P(RadioNetworkTest, setSatellitePlmn) {
    }

    serial = GetRandomSerialNumber();
    radio_network->setSatellitePlmn(serial, 0, {"123456"}, {"123456, 3456789"});
    radio_network->setSatellitePlmn(serial, {"123456"}, {"123456, 3456789"});
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
@@ -2654,7 +2654,7 @@ TEST_P(RadioNetworkTest, setSatelliteEnabledForCarrier) {

    // Get current value
    serial = GetRandomSerialNumber();
    radio_network->isSatelliteEnabledForCarrier(serial, 0);
    radio_network->isSatelliteEnabledForCarrier(serial);
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    bool originalSatelliteEnabledSetting = radioRsp_network->isSatelliteEnabledForCarrier;

@@ -2663,7 +2663,7 @@ TEST_P(RadioNetworkTest, setSatelliteEnabledForCarrier) {
    // for the right default value.
    bool valueToSet = !originalSatelliteEnabledSetting;
    serial = GetRandomSerialNumber();
    radio_network->setSatelliteEnabledForCarrier(serial, 0, valueToSet);
    radio_network->setSatelliteEnabledForCarrier(serial, valueToSet);
    EXPECT_EQ(std::cv_status::no_timeout, wait());
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
@@ -2675,7 +2675,7 @@ TEST_P(RadioNetworkTest, setSatelliteEnabledForCarrier) {
    if (radioRsp_network->rspInfo.error == RadioError::NONE) {
        // Assert the value has changed
        serial = GetRandomSerialNumber();
        ndk::ScopedAStatus res = radio_network->isSatelliteEnabledForCarrier(serial, 0);
        ndk::ScopedAStatus res = radio_network->isSatelliteEnabledForCarrier(serial);

        ASSERT_OK(res);
        EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -2687,7 +2687,7 @@ TEST_P(RadioNetworkTest, setSatelliteEnabledForCarrier) {
        EXPECT_EQ(valueToSet, radioRsp_network->isSatelliteEnabledForCarrier);

        // Reset original state
        radio_network->setSatelliteEnabledForCarrier(serial, 0, originalSatelliteEnabledSetting);
        radio_network->setSatelliteEnabledForCarrier(serial, originalSatelliteEnabledSetting);
        EXPECT_EQ(std::cv_status::no_timeout, wait());
        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
        EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);