Add requestSelectedSatelliteSubscriptionId API in PhoneInterfaceManager.
Also add API in SatelliteManagerWrapper and add test button.
Bug: 378557737
Change-Id: I3cb9705560012f8dc2f321567ee8043692ec25af
Test: atest SatelliteManagerTest
FLAG: com.android.internal.telephony.flags.carrier_roaming_nb_iot_ntn
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 440c39d..f3028cf 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -13767,6 +13767,25 @@
}
/**
+ * Request to get the currently selected satellite subscription id.
+ *
+ * @param result The result receiver that returns the currently selected satellite subscription
+ * id if the request is successful or an error code if the request failed.
+ *
+ * @throws SecurityException if the caller doesn't have the required permission.
+ */
+ @Override
+ public void requestSelectedNbIotSatelliteSubscriptionId(@NonNull ResultReceiver result) {
+ enforceSatelliteCommunicationPermission("requestSelectedNbIotSatelliteSubscriptionId");
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ mSatelliteController.requestSelectedNbIotSatelliteSubscriptionId(result);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ /**
* Inform whether the device is aligned with the satellite in both real and demo mode.
*
* @param isAligned {@code true} Device is aligned with the satellite.