Merge "Update VtsHalPowerTargetTest to not break" into main
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomParams.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomParams.aidl
index de92105..a38156a 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomParams.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomParams.aidl
@@ -36,14 +36,9 @@
 parcelable CpuHeadroomParams {
   android.hardware.power.CpuHeadroomParams.CalculationType calculationType = android.hardware.power.CpuHeadroomParams.CalculationType.MIN;
   int calculationWindowMillis = 1000;
-  android.hardware.power.CpuHeadroomParams.SelectionType selectionType = android.hardware.power.CpuHeadroomParams.SelectionType.ALL;
   int[] tids;
   enum CalculationType {
     MIN,
     AVERAGE,
   }
-  enum SelectionType {
-    ALL,
-    PER_CORE,
-  }
 }
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomResult.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomResult.aidl
index 9303906..21b1e69 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomResult.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/CpuHeadroomResult.aidl
@@ -35,5 +35,4 @@
 @JavaDerive(equals=true, toString=true) @VintfStability
 union CpuHeadroomResult {
   float globalHeadroom;
-  float[] perCoreHeadroom;
 }
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
index 9d20ca1..080c0bd 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
@@ -46,8 +46,6 @@
   android.hardware.power.SupportInfo getSupportInfo();
   android.hardware.power.CpuHeadroomResult getCpuHeadroom(in android.hardware.power.CpuHeadroomParams params);
   android.hardware.power.GpuHeadroomResult getGpuHeadroom(in android.hardware.power.GpuHeadroomParams params);
-  long getCpuHeadroomMinIntervalMillis();
-  long getGpuHeadroomMinIntervalMillis();
   oneway void sendCompositionData(in android.hardware.power.CompositionData[] data);
   oneway void sendCompositionUpdate(in android.hardware.power.CompositionUpdate update);
 }
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
index 9609169..c90125c 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
@@ -41,6 +41,7 @@
   long sessionModes;
   long sessionTags;
   android.hardware.power.SupportInfo.CompositionDataSupportInfo compositionData;
+  android.hardware.power.SupportInfo.HeadroomSupportInfo headroom;
   @VintfStability
   parcelable CompositionDataSupportInfo {
     boolean isSupported;
@@ -48,4 +49,11 @@
     int maxBatchSize;
     boolean alwaysBatch;
   }
+  @VintfStability
+  parcelable HeadroomSupportInfo {
+    boolean isCpuSupported;
+    boolean isGpuSupported;
+    int cpuMinIntervalMillis;
+    int gpuMinIntervalMillis;
+  }
 }
diff --git a/power/aidl/android/hardware/power/CpuHeadroomParams.aidl b/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
index 64c7b44..fab8f43 100644
--- a/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
+++ b/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
@@ -42,21 +42,6 @@
     int calculationWindowMillis = 1000;
 
     /**
-     * Defines how to select the CPU.
-     */
-    enum SelectionType {
-        // Default to return a single value for all cores.
-        ALL,
-        // Returns per-core headroom in a list.
-        PER_CORE,
-    }
-
-    /**
-     * The CPU selection type.
-     */
-    SelectionType selectionType = SelectionType.ALL;
-
-    /**
      * The thread TIDs to track.
      *
      * If tids are not-empty, return the headrooms only for cores that are available
diff --git a/power/aidl/android/hardware/power/CpuHeadroomResult.aidl b/power/aidl/android/hardware/power/CpuHeadroomResult.aidl
index 316d5f6..e7ed8b6 100644
--- a/power/aidl/android/hardware/power/CpuHeadroomResult.aidl
+++ b/power/aidl/android/hardware/power/CpuHeadroomResult.aidl
@@ -29,8 +29,4 @@
      * If ALL selection type is requested.
      */
     float globalHeadroom;
-    /**
-     * If PER_CORE selection type is requested.
-     */
-    float[] perCoreHeadroom;
 }
diff --git a/power/aidl/android/hardware/power/IPower.aidl b/power/aidl/android/hardware/power/IPower.aidl
index 41a9379..ce61af4 100644
--- a/power/aidl/android/hardware/power/IPower.aidl
+++ b/power/aidl/android/hardware/power/IPower.aidl
@@ -181,26 +181,6 @@
     GpuHeadroomResult getGpuHeadroom(in GpuHeadroomParams params);
 
     /**
-     * Minimum polling interval for calling getCpuHeadroom in milliseconds.
-     *
-     * The getCpuHeadroom API may return cached result if called more frequent
-     * than the interval.
-     *
-     * @throws EX_UNSUPPORTED_OPERATION if the API is unsupported.
-     */
-    long getCpuHeadroomMinIntervalMillis();
-
-    /**
-     * Minimum polling interval for calling getGpuHeadroom in milliseconds.
-     *
-     * The getGpuHeadroom API may return cached result if called more frequent
-     * than the interval.
-     *
-     * @throws EX_UNSUPPORTED_OPERATION if the API is unsupported.
-     */
-    long getGpuHeadroomMinIntervalMillis();
-
-    /**
      * Sent to PowerHAL when there are surface-attached sessions being composed,
      * providing FPS and frame timing data that can be used to supplement
      * and validate timing sent via reportActual. This call can be batched,
diff --git a/power/aidl/android/hardware/power/SupportInfo.aidl b/power/aidl/android/hardware/power/SupportInfo.aidl
index 4178b3a..55287cb 100644
--- a/power/aidl/android/hardware/power/SupportInfo.aidl
+++ b/power/aidl/android/hardware/power/SupportInfo.aidl
@@ -77,6 +77,11 @@
      */
     CompositionDataSupportInfo compositionData;
 
+    /**
+     *  Parcel detailing support info for headroom information.
+     */
+    HeadroomSupportInfo headroom;
+
     @VintfStability
     parcelable CompositionDataSupportInfo {
         /**
@@ -106,4 +111,33 @@
          */
         boolean alwaysBatch;
     }
+
+    @VintfStability
+    parcelable HeadroomSupportInfo {
+        /**
+         * Whether the CPU headroom feature is supported.
+         */
+        boolean isCpuSupported;
+
+        /**
+         * Whether the GPU headroom feature is supported.
+         */
+        boolean isGpuSupported;
+
+        /**
+         * Minimum polling interval for calling getCpuHeadroom in milliseconds
+         *
+         * The getCpuHeadroom API may return cached result if called more frequent
+         * than the interval.
+         */
+        int cpuMinIntervalMillis;
+
+        /**
+         * Minimum polling interval for calling getGpuHeadroom in milliseconds.
+         *
+         * The getGpuHeadroom API may return cached result if called more frequent
+         * than the interval.
+         */
+        int gpuMinIntervalMillis;
+    }
 }
diff --git a/power/aidl/default/Power.cpp b/power/aidl/default/Power.cpp
index 8490b62..0a9c90f 100644
--- a/power/aidl/default/Power.cpp
+++ b/power/aidl/default/Power.cpp
@@ -71,33 +71,12 @@
     return ScopedAStatus::ok();
 }
 
-ndk::ScopedAStatus Power::getCpuHeadroom(const CpuHeadroomParams& params,
-                                         CpuHeadroomResult* _aidl_return) {
-    if (params.selectionType == CpuHeadroomParams::SelectionType::ALL) {
-        _aidl_return->set<CpuHeadroomResult::globalHeadroom>(100.0f);
-        return ndk::ScopedAStatus::ok();
-    } else if (params.selectionType == CpuHeadroomParams::SelectionType::PER_CORE) {
-        std::vector<float> headroom = {50.0f, 100.0f};
-        _aidl_return->set<CpuHeadroomResult::perCoreHeadroom>(headroom);
-        return ndk::ScopedAStatus::ok();
-    }
+ndk::ScopedAStatus Power::getCpuHeadroom(const CpuHeadroomParams&, CpuHeadroomResult*) {
     return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
 }
 
-ndk::ScopedAStatus Power::getGpuHeadroom(const GpuHeadroomParams& _,
-                                         GpuHeadroomResult* _aidl_return) {
-    _aidl_return->set<GpuHeadroomResult::globalHeadroom>(100.0f);
-    return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus Power::getCpuHeadroomMinIntervalMillis(int64_t* _aidl_return) {
-    *_aidl_return = 1000;
-    return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus Power::getGpuHeadroomMinIntervalMillis(int64_t* _aidl_return) {
-    *_aidl_return = 1000;
-    return ndk::ScopedAStatus::ok();
+ndk::ScopedAStatus Power::getGpuHeadroom(const GpuHeadroomParams&, GpuHeadroomResult*) {
+    return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
 }
 
 ScopedAStatus Power::createHintSession(int32_t, int32_t, const std::vector<int32_t>& tids, int64_t,
@@ -163,6 +142,12 @@
                                               .disableGpuFences = false,
                                               .maxBatchSize = 1,
                                               .alwaysBatch = false,
+                                      },
+                                      .headroom = {
+                                              .isCpuSupported = false,
+                                              .isGpuSupported = false,
+                                              .cpuMinIntervalMillis = 0,
+                                              .gpuMinIntervalMillis = 0,
                                       }};
     // Copy the support object into the binder
     *_aidl_return = supportInfo;
diff --git a/power/aidl/default/Power.h b/power/aidl/default/Power.h
index c4aa7ab..118097f 100644
--- a/power/aidl/default/Power.h
+++ b/power/aidl/default/Power.h
@@ -50,8 +50,6 @@
 
     ndk::ScopedAStatus getGpuHeadroom(const GpuHeadroomParams& params,
                                       GpuHeadroomResult* _aidl_return) override;
-    ndk::ScopedAStatus getCpuHeadroomMinIntervalMillis(int64_t* _aidl_return) override;
-    ndk::ScopedAStatus getGpuHeadroomMinIntervalMillis(int64_t* _aidl_return) override;
     ndk::ScopedAStatus sendCompositionData(const std::vector<CompositionData>& in_data) override;
     ndk::ScopedAStatus sendCompositionUpdate(const CompositionUpdate& in_update) override;
 
diff --git a/power/aidl/vts/VtsHalPowerTargetTest.cpp b/power/aidl/vts/VtsHalPowerTargetTest.cpp
index 7256b79..87797ae 100644
--- a/power/aidl/vts/VtsHalPowerTargetTest.cpp
+++ b/power/aidl/vts/VtsHalPowerTargetTest.cpp
@@ -311,13 +311,12 @@
     CpuHeadroomParams params;
     CpuHeadroomResult headroom;
     auto ret = power->getCpuHeadroom(params, &headroom);
-    if (ret.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
+    if (!mSupportInfo->headroom.isCpuSupported) {
+        ASSERT_EQ(ret.getExceptionCode(), EX_UNSUPPORTED_OPERATION);
         GTEST_SKIP() << "power->getCpuHeadroom is not supported";
     }
     ASSERT_TRUE(ret.isOk());
-    int64_t minIntervalMillis;
-    ASSERT_TRUE(power->getCpuHeadroomMinIntervalMillis(&minIntervalMillis).isOk());
-    ASSERT_GE(minIntervalMillis, 0);
+    ASSERT_GE(mSupportInfo->headroom.cpuMinIntervalMillis, 0);
     ASSERT_EQ(headroom.getTag(), CpuHeadroomResult::globalHeadroom);
     ASSERT_GE(headroom.get<CpuHeadroomResult::globalHeadroom>(), 0.0f);
     ASSERT_LE(headroom.get<CpuHeadroomResult::globalHeadroom>(), 100.00f);
@@ -330,13 +329,12 @@
     GpuHeadroomParams params;
     GpuHeadroomResult headroom;
     auto ret = power->getGpuHeadroom(params, &headroom);
-    if (ret.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
+    if (!mSupportInfo->headroom.isGpuSupported) {
+        ASSERT_EQ(ret.getExceptionCode(), EX_UNSUPPORTED_OPERATION);
         GTEST_SKIP() << "power->getGpuHeadroom is not supported";
     }
     ASSERT_TRUE(ret.isOk());
-    int64_t minIntervalMillis;
-    ASSERT_TRUE(power->getGpuHeadroomMinIntervalMillis(&minIntervalMillis).isOk());
-    ASSERT_GE(minIntervalMillis, 0);
+    ASSERT_GE(mSupportInfo->headroom.gpuMinIntervalMillis, 0);
     ASSERT_EQ(headroom.getTag(), GpuHeadroomResult::globalHeadroom);
     ASSERT_GE(headroom.get<GpuHeadroomResult::globalHeadroom>(), 0.0f);
     ASSERT_LE(headroom.get<GpuHeadroomResult::globalHeadroom>(), 100.00f);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
index 37737a7..a6fd27a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
@@ -92,4 +92,7 @@
   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);
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 4c6d100..080b4aa 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -91,4 +91,7 @@
   oneway void setCellularIdentifierTransparencyEnabledResponse(in android.hardware.radio.RadioResponseInfo info);
   oneway void setSecurityAlgorithmsUpdatedEnabledResponse(in android.hardware.radio.RadioResponseInfo info);
   oneway void isSecurityAlgorithmsUpdatedEnabledResponse(in android.hardware.radio.RadioResponseInfo info, in boolean isEnabled);
+  oneway void setSatellitePlmnResponse(in android.hardware.radio.RadioResponseInfo info);
+  oneway void setSatelliteEnabledForCarrierResponse(in android.hardware.radio.RadioResponseInfo info);
+  oneway void isSatelliteEnabledForCarrierResponse(in android.hardware.radio.RadioResponseInfo info, boolean isEnabled);
 }
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 41bac17..68e4829 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -717,4 +717,60 @@
      * This is available when android.hardware.telephony.access is defined.
      */
     void isSecurityAlgorithmsUpdatedEnabled(in int serial);
+
+    /**
+     * Set the non-terrestrial PLMN with lower priority than terrestrial networks.
+     * MCC/MNC broadcast by the non-terrestrial networks may not be included in OPLMNwACT file on
+     * SIM profile. Acquisition of satellite based system is lower priority to terrestrial
+     * networks. UE shall make all attempts to acquire terrestrial service prior to camping on
+     * 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
+     *                              carrierPlmnArray and also list of satellite PLMNs that are not
+     *                              supported by the carrier.
+     *                              Modem should use the allSatellitePlmnArray to identify satellite
+     *                              PLMNs that are not supported by the carrier and make sure not to
+     *                              attach to them.
+     *
+     * Response function is IRadioNetworkResponse.setSatellitePlmnResponse()
+     *
+     * 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);
+
+    /**
+     * Enable or disable satellite in the cellular modem associated with a carrier.
+     *
+     * Refer setSatellitePlmn for the details of satellite PLMN scanning process. Once modem is
+     * disabled, modem should not attach to any of the PLMNs present in allSatellitePlmnArray.
+     * 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);
+
+    /**
+     * 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);
 }
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 92be4b5..4c1a394 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -816,4 +816,53 @@
      */
     void isSecurityAlgorithmsUpdatedEnabledResponse(
             in RadioResponseInfo info, in boolean isEnabled);
+
+    /**
+     * Response of setSatellitePlmn.
+     * This is an optional API.
+     *
+     * @param info Response info struct containing response type, serial no. and error.
+     *
+     * Valid errors returned:
+     *   RadioError:REQUEST_NOT_SUPPORTED
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:INTERNAL_ERR
+     *   RadioError:REQUEST_NOT_SUPPORTED
+     *   RadioError:INVALID_STATE
+     */
+    void setSatellitePlmnResponse(in RadioResponseInfo info);
+
+    /**
+     * Response of setSatelliteEnabledForCarrier.
+     * This is an optional API.
+     *
+     * @param info Response info struct containing response type, serial no. and error.
+     *
+     * Valid errors returned:
+     *   RadioError:REQUEST_NOT_SUPPORTED
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:INTERNAL_ERR
+     *   RadioError:REQUEST_NOT_SUPPORTED
+     *   RadioError:INVALID_STATE
+     */
+    void setSatelliteEnabledForCarrierResponse(in RadioResponseInfo info);
+
+    /**
+     * Response of isSatelliteEnabledForCarrier.
+     * This is an optional API.
+     *
+     * @param info Response info struct containing response type, serial no. and error.
+     * @param isEnabled Indicates whether satellite is enabled for carrier or not.
+     *
+     * Valid errors returned:
+     *   RadioError:REQUEST_NOT_SUPPORTED
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:INTERNAL_ERR
+     *   RadioError:REQUEST_NOT_SUPPORTED
+     *   RadioError:INVALID_STATE
+     */
+    void isSatelliteEnabledForCarrierResponse(in RadioResponseInfo info, boolean isEnabled);
 }
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
index 56724ae..c9a3270 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
@@ -114,6 +114,13 @@
     ::ndk::ScopedAStatus setSecurityAlgorithmsUpdatedEnabled(int32_t serial, bool enabled) override;
     ::ndk::ScopedAStatus isSecurityAlgorithmsUpdatedEnabled(int32_t serial) override;
 
+    ::ndk::ScopedAStatus setSatellitePlmn(
+            int32_t serial, int32_t simSlot, const std::vector<std::string>& carrierPlmnArray,
+            const std::vector<std::string>& allSatellitePlmnArray) override;
+    ::ndk::ScopedAStatus setSatelliteEnabledForCarrier(int32_t serial, int32_t simSlot,
+                                                       bool satelliteEnabled) override;
+    ::ndk::ScopedAStatus isSatelliteEnabledForCarrier(int32_t serial, int32_t simSlot) override;
+
   protected:
     std::shared_ptr<::aidl::android::hardware::radio::network::IRadioNetworkResponse> respond();
 
diff --git a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
index 1e43789..b5aee5c 100644
--- a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
+++ b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
@@ -402,4 +402,28 @@
     return ok();
 }
 
+ScopedAStatus RadioNetwork::setSatellitePlmn(
+        int32_t serial, int32_t /*simSlot*/, const std::vector<std::string>& /*carrierPlmnArray*/,
+        const std::vector<std::string>& /*allSatellitePlmnArray*/) {
+    LOG_CALL << serial;
+    LOG(ERROR) << " setSatellitePlmn is unsupported by HIDL HALs";
+    respond()->setSatellitePlmnResponse(notSupported(serial));
+    return ok();
+}
+
+ScopedAStatus RadioNetwork::setSatelliteEnabledForCarrier(int32_t serial, int32_t /*simSlot*/,
+                                                          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*/) {
+    LOG_CALL << serial;
+    LOG(ERROR) << " isSatelliteEnabledForCarrier is unsupported by HIDL HALs";
+    respond()->isSatelliteEnabledForCarrierResponse(notSupported(serial), false);
+    return ok();
+}
+
 }  // namespace android::hardware::radio::compat
diff --git a/radio/aidl/vts/radio_network_response.cpp b/radio/aidl/vts/radio_network_response.cpp
index 4d452d0..df59687 100644
--- a/radio/aidl/vts/radio_network_response.cpp
+++ b/radio/aidl/vts/radio_network_response.cpp
@@ -350,3 +350,24 @@
     parent_network.notify(info.serial);
     return ndk::ScopedAStatus::ok();
 }
+
+ndk::ScopedAStatus RadioNetworkResponse::setSatellitePlmnResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent_network.notify(info.serial);
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioNetworkResponse::setSatelliteEnabledForCarrierResponse(
+        const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent_network.notify(info.serial);
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioNetworkResponse::isSatelliteEnabledForCarrierResponse(
+        const RadioResponseInfo& info, bool enabled) {
+    rspInfo = info;
+    this->isSatelliteEnabledForCarrier = enabled;
+    parent_network.notify(info.serial);
+    return ndk::ScopedAStatus::ok();
+}
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 3d24165..1778c3f 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -2614,3 +2614,82 @@
                                  {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
                                   RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
 }
+
+/*
+ * Test IRadioNetwork.setSatellitePlmn for the response returned.
+ */
+TEST_P(RadioNetworkTest, setSatellitePlmn) {
+    int32_t aidl_version;
+    ndk::ScopedAStatus aidl_status = radio_network->getInterfaceVersion(&aidl_version);
+    ASSERT_OK(aidl_status);
+    if (aidl_version < 4) {
+        ALOGI("Skipped the test since"
+              " setSatellitePlmn is not supported on version < 4");
+        GTEST_SKIP();
+    }
+
+    serial = GetRandomSerialNumber();
+    radio_network->setSatellitePlmn(serial, 0, {"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);
+
+    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
+                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
+}
+
+/*
+ * Test IRadioNetwork.setSatelliteEnabledForCarrier for the response returned.
+ */
+TEST_P(RadioNetworkTest, setSatelliteEnabledForCarrier) {
+    int32_t aidl_version;
+    ndk::ScopedAStatus aidl_status = radio_network->getInterfaceVersion(&aidl_version);
+    ASSERT_OK(aidl_status);
+    if (aidl_version < 4) {
+        ALOGI("Skipped the test since"
+              " setSatelliteEnabledForCarrier is not supported on version < 4");
+        GTEST_SKIP();
+    }
+
+    // Get current value
+    serial = GetRandomSerialNumber();
+    radio_network->isSatelliteEnabledForCarrier(serial, 0);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    bool originalSatelliteEnabledSetting = radioRsp_network->isSatelliteEnabledForCarrier;
+
+    // We want to test flipping the value, so we are going to set it to the opposite of what
+    // the existing setting is. The test for isSatelliteEnabledForCarrier should check
+    // for the right default value.
+    bool valueToSet = !originalSatelliteEnabledSetting;
+    serial = GetRandomSerialNumber();
+    radio_network->setSatelliteEnabledForCarrier(serial, 0, valueToSet);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
+
+    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
+                                 {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+                                  RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
+
+    if (radioRsp_network->rspInfo.error == RadioError::NONE) {
+        // Assert the value has changed
+        serial = GetRandomSerialNumber();
+        ndk::ScopedAStatus res = radio_network->isSatelliteEnabledForCarrier(serial, 0);
+
+        ASSERT_OK(res);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
+        EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
+                                     {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+                                      RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
+        EXPECT_EQ(valueToSet, radioRsp_network->isSatelliteEnabledForCarrier);
+
+        // Reset original state
+        radio_network->setSatelliteEnabledForCarrier(serial, 0, originalSatelliteEnabledSetting);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
+        EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
+    }
+}
diff --git a/radio/aidl/vts/radio_network_utils.h b/radio/aidl/vts/radio_network_utils.h
index ad530eb..17c0896 100644
--- a/radio/aidl/vts/radio_network_utils.h
+++ b/radio/aidl/vts/radio_network_utils.h
@@ -48,6 +48,7 @@
     std::vector<RadioAccessSpecifier> specifiers;
     bool isCellularIdentifierTransparencyEnabled = false;
     bool isSecurityAlgorithmsUpdatedEnabled = false;
+    bool isSatelliteEnabledForCarrier = false;
 
     virtual ndk::ScopedAStatus acknowledgeRequest(int32_t serial) override;
 
@@ -183,6 +184,14 @@
 
     virtual ndk::ScopedAStatus setSecurityAlgorithmsUpdatedEnabledResponse(
             const RadioResponseInfo& info) override;
+
+    virtual ndk::ScopedAStatus setSatellitePlmnResponse(const RadioResponseInfo& info) override;
+
+    virtual ndk::ScopedAStatus setSatelliteEnabledForCarrierResponse(
+            const RadioResponseInfo& info) override;
+
+    virtual ndk::ScopedAStatus isSatelliteEnabledForCarrierResponse(const RadioResponseInfo& info,
+                                                                    bool isEnabled) override;
 };
 
 /* Callback class for radio network indication */