Merge "Add callback into vendor interface to receive modem state change event" into 24D1-dev am: 0b6c1ecb4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telephony/+/26618709
Change-Id: I8074b9fedd2610917d336694cda9512223698c66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 6118640..26e9185 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -159,6 +159,7 @@
import android.telephony.satellite.ISatelliteDatagramCallback;
import android.telephony.satellite.ISatelliteModemStateCallback;
import android.telephony.satellite.ISatelliteProvisionStateCallback;
+import android.telephony.satellite.ISatelliteSupportedStateCallback;
import android.telephony.satellite.ISatelliteTransmissionUpdateCallback;
import android.telephony.satellite.NtnSignalStrength;
import android.telephony.satellite.NtnSignalStrengthCallback;
@@ -13420,7 +13421,7 @@
*
* @param subId The subId of the subscription to request for.
* @param reason Reason for disallowing satellite communication for carrier.
- * @param callback Listener for the {@link SatelliteManager.SatelliteError} result of the
+ * @param callback Listener for the {@link SatelliteManager.SatelliteResult} result of the
* operation.
*
* @throws SecurityException if the caller doesn't have required permission.
@@ -13443,7 +13444,7 @@
*
* @param subId The subId of the subscription to request for.
* @param reason Reason for disallowing satellite communication.
- * @param callback Listener for the {@link SatelliteManager.SatelliteError} result of the
+ * @param callback Listener for the {@link SatelliteManager.SatelliteResult} result of the
* operation.
*
* @throws SecurityException if the caller doesn't have required permission.
@@ -13462,7 +13463,7 @@
/**
* Get reasons for disallowing satellite communication, as requested by
- * {@link #addSatelliteAttachRestrictionForCarrier(int, int, IIntegerConsumer)}.
+ * {@link #addAttachRestrictionForCarrier(int, int, IIntegerConsumer)}.
*
* @param subId The subId of the subscription to request for.
*
@@ -13598,6 +13599,40 @@
}
/**
+ * Registers for the satellite supported state changed.
+ *
+ * @param subId The subId of the subscription to register for supported state changed.
+ * @param callback The callback to handle the satellite supported state changed event.
+ *
+ * @return The {@link SatelliteManager.SatelliteResult} result of the operation.
+ *
+ * @throws SecurityException if the caller doesn't have the required permission.
+ */
+ @Override
+ @SatelliteManager.SatelliteResult public int registerForSatelliteSupportedStateChanged(
+ int subId, @NonNull ISatelliteSupportedStateCallback callback) {
+ enforceSatelliteCommunicationPermission("registerForSatelliteSupportedStateChanged");
+ return mSatelliteController.registerForSatelliteSupportedStateChanged(subId, callback);
+ }
+
+ /**
+ * Unregisters for the satellite supported state changed.
+ * If callback was not registered before, the request will be ignored.
+ *
+ * @param subId The subId of the subscription to unregister for supported state changed.
+ * @param callback The callback that was passed to
+ * {@link #registerForSatelliteSupportedStateChanged(int, ISatelliteSupportedStateCallback)}.
+ *
+ * @throws SecurityException if the caller doesn't have the required permission.
+ */
+ @Override
+ public void unregisterForSatelliteSupportedStateChanged(
+ int subId, @NonNull ISatelliteSupportedStateCallback callback) {
+ enforceSatelliteCommunicationPermission("unregisterForSatelliteSupportedStateChanged");
+ mSatelliteController.unregisterForSatelliteSupportedStateChanged(subId, callback);
+ }
+
+ /**
* This API can be used by only CTS to update satellite vendor service package name.
*
* @param servicePackageName The package name of the satellite vendor service.