diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java index c3522668a83c0..64454cc50a5ce 100644 --- a/telephony/java/android/telephony/satellite/SatelliteManager.java +++ b/telephony/java/android/telephony/satellite/SatelliteManager.java @@ -166,8 +166,8 @@ public class SatelliteManager { public static final String KEY_SATELLITE_NEXT_VISIBILITY = "satellite_next_visibility"; /** - * Bundle key to get the respoonse from - * {@link #sendSatelliteDatagram(long, int, SatelliteDatagram, Executor, OutcomeReceiver)}. + * Bundle key to get the respoonse from {@link + * #sendSatelliteDatagram(long, int, SatelliteDatagram, boolean, Executor, OutcomeReceiver)}. * @hide */ public static final String KEY_SEND_SATELLITE_DATAGRAM = "send_satellite_datagram"; @@ -700,6 +700,10 @@ public class SatelliteManager { * Satellite modem is powered off. */ public static final int SATELLITE_MODEM_STATE_OFF = 4; + /** + * Satellite modem is unavailable. + */ + public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5; /** * Satellite modem state is unknown. This generic modem state should be used only when the * modem state cannot be mapped to other specific modem states. @@ -713,6 +717,7 @@ public class SatelliteManager { SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING, SATELLITE_MODEM_STATE_DATAGRAM_RETRYING, SATELLITE_MODEM_STATE_OFF, + SATELLITE_MODEM_STATE_UNAVAILABLE, SATELLITE_MODEM_STATE_UNKNOWN }) @Retention(RetentionPolicy.SOURCE) diff --git a/telephony/java/android/telephony/satellite/stub/ISatellite.aidl b/telephony/java/android/telephony/satellite/stub/ISatellite.aidl index 5dc1a6529151d..d93ee217c2fbf 100644 --- a/telephony/java/android/telephony/satellite/stub/ISatellite.aidl +++ b/telephony/java/android/telephony/satellite/stub/ISatellite.aidl @@ -31,7 +31,6 @@ oneway interface ISatellite { * Register the callback interface with satellite service. * * @param listener The callback interface to handle satellite service indications. - * @param errorCallback The callback to receive the error code result of the operation. * * Valid error codes returned: * SatelliteError:ERROR_NONE @@ -43,7 +42,7 @@ oneway interface ISatellite { * SatelliteError:REQUEST_NOT_SUPPORTED * SatelliteError:NO_RESOURCES */ - void setSatelliteListener(in ISatelliteListener listener, in IIntegerConsumer errorCallback); + void setSatelliteListener(in ISatelliteListener listener); /** * Request to enable or disable the satellite service listening mode. @@ -51,6 +50,8 @@ oneway interface ISatellite { * * @param enable True to enable satellite listening mode and false to disable. * @param isDemoMode Whether demo mode is enabled. + * @param timeout How long the satellite modem should wait for the next incoming page before + * disabling listening mode. * @param errorCallback The callback to receive the error code result of the operation. * * Valid error codes returned: @@ -63,7 +64,7 @@ oneway interface ISatellite { * SatelliteError:REQUEST_NOT_SUPPORTED * SatelliteError:NO_RESOURCES */ - void requestSatelliteListeningEnabled(in boolean enable, in boolean isDemoMode, + void requestSatelliteListeningEnabled(in boolean enable, in boolean isDemoMode, in int timeout, in IIntegerConsumer errorCallback); /** diff --git a/telephony/java/android/telephony/satellite/stub/ISatelliteListener.aidl b/telephony/java/android/telephony/satellite/stub/ISatelliteListener.aidl index e24e892e5b555..d9668687e6e6c 100644 --- a/telephony/java/android/telephony/satellite/stub/ISatelliteListener.aidl +++ b/telephony/java/android/telephony/satellite/stub/ISatelliteListener.aidl @@ -36,10 +36,10 @@ oneway interface ISatelliteListener { /** * Indicates that new datagrams have been received on the device. * - * @param datagrams Array of new datagrams received. - * @param pendingCount The number of datagrams that are pending. + * @param datagram New datagram that was received. + * @param pendingCount Number of additional datagrams yet to be received. */ - void onSatelliteDatagramsReceived(in SatelliteDatagram[] datagrams, in int pendingCount); + void onSatelliteDatagramReceived(in SatelliteDatagram datagram, in int pendingCount); /** * Indicates that the satellite has pending datagrams for the device to be pulled. diff --git a/telephony/java/android/telephony/satellite/stub/SatelliteImplBase.java b/telephony/java/android/telephony/satellite/stub/SatelliteImplBase.java index df51432438120..711dcbe3f62b6 100644 --- a/telephony/java/android/telephony/satellite/stub/SatelliteImplBase.java +++ b/telephony/java/android/telephony/satellite/stub/SatelliteImplBase.java @@ -63,19 +63,19 @@ public class SatelliteImplBase extends SatelliteService { private final IBinder mBinder = new ISatellite.Stub() { @Override - public void setSatelliteListener(ISatelliteListener listener, - IIntegerConsumer errorCallback) throws RemoteException { + public void setSatelliteListener(ISatelliteListener listener) throws RemoteException { executeMethodAsync( - () -> SatelliteImplBase.this.setSatelliteListener(listener, errorCallback), + () -> SatelliteImplBase.this.setSatelliteListener(listener), "setSatelliteListener"); } @Override public void requestSatelliteListeningEnabled(boolean enable, boolean isDemoMode, - IIntegerConsumer errorCallback) throws RemoteException { + int timeout, IIntegerConsumer errorCallback) throws RemoteException { executeMethodAsync( () -> SatelliteImplBase.this - .requestSatelliteListeningEnabled(enable, isDemoMode, errorCallback), + .requestSatelliteListeningEnabled( + enable, isDemoMode, timeout, errorCallback), "requestSatelliteListeningEnabled"); } @@ -229,7 +229,6 @@ public class SatelliteImplBase extends SatelliteService { * Register the callback interface with satellite service. * * @param listener The callback interface to handle satellite service indications. - * @param errorCallback The callback to receive the error code result of the operation. * * Valid error codes returned: * SatelliteError:ERROR_NONE @@ -241,8 +240,7 @@ public class SatelliteImplBase extends SatelliteService { * SatelliteError:REQUEST_NOT_SUPPORTED * SatelliteError:NO_RESOURCES */ - public void setSatelliteListener(@NonNull ISatelliteListener listener, - @NonNull IIntegerConsumer errorCallback) { + public void setSatelliteListener(@NonNull ISatelliteListener listener) { // stub implementation } @@ -252,6 +250,8 @@ public class SatelliteImplBase extends SatelliteService { * * @param enable True to enable satellite listening mode and false to disable. * @param isDemoMode Whether demo mode is enabled. + * @param timeout How long the satellite modem should wait for the next incoming page before + * disabling listening mode. * @param errorCallback The callback to receive the error code result of the operation. * * Valid error codes returned: @@ -264,7 +264,7 @@ public class SatelliteImplBase extends SatelliteService { * SatelliteError:REQUEST_NOT_SUPPORTED * SatelliteError:NO_RESOURCES */ - public void requestSatelliteListeningEnabled(boolean enable, boolean isDemoMode, + public void requestSatelliteListeningEnabled(boolean enable, boolean isDemoMode, int timeout, @NonNull IIntegerConsumer errorCallback) { // stub implementation } diff --git a/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl b/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl index 5ee7f9abdcf18..e4f94134caa1e 100644 --- a/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl +++ b/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl @@ -41,6 +41,10 @@ enum SatelliteModemState { * Satellite modem is powered off. */ SATELLITE_MODEM_STATE_OFF = 4, + /** + * Satellite modem is unavailable. + */ + SATELLITE_MODEM_STATE_UNAVAILABLE = 5, /** * Satellite modem state is unknown. This generic modem state should be used only when the * modem state cannot be mapped to other specific modem states.