Loading telephony/java/android/telephony/satellite/ISatelliteTransmissionUpdateCallback.aidl +12 −5 Original line number Diff line number Diff line Loading @@ -24,15 +24,22 @@ import android.telephony.satellite.PointingInfo; */ oneway interface ISatelliteTransmissionUpdateCallback { /** * Called when satellite datagram transfer state changed. * Called when satellite datagram send state changed. * * @param state The new datagram transfer state. * @param state The new send datagram transfer state. * @param sendPendingCount The number of datagrams that are currently being sent. * @param receivePendingCount The number of datagrams that are currently being received. * @param errorCode If datagram transfer failed, the reason for failure. */ void onDatagramTransferStateChanged(in int state, in int sendPendingCount, in int receivePendingCount, in int errorCode); void onSendDatagramStateChanged(in int state, in int sendPendingCount, in int errorCode); /** * Called when satellite datagram receive state changed. * * @param state The new receive datagram transfer state. * @param receivePendingCount The number of datagrams that are currently pending to be received. * @param errorCode If datagram transfer failed, the reason for failure. */ void onReceiveDatagramStateChanged(in int state, in int receivePendingCount, in int errorCode); /** * Called when the satellite position changed. Loading telephony/java/android/telephony/satellite/SatelliteManager.java +16 −7 Original line number Diff line number Diff line Loading @@ -647,6 +647,7 @@ public class SatelliteManager { }) @Retention(RetentionPolicy.SOURCE) public @interface SatelliteDatagramTransferState {} // TODO: Split into two enums for sending and receiving states /** * Satellite modem is in idle state. Loading Loading @@ -750,19 +751,27 @@ public class SatelliteManager { }; ISatelliteTransmissionUpdateCallback internalCallback = new ISatelliteTransmissionUpdateCallback.Stub() { @Override public void onDatagramTransferStateChanged(int state, int sendPendingCount, int receivePendingCount, int errorCode) { public void onSatellitePositionChanged(PointingInfo pointingInfo) { executor.execute(() -> Binder.withCleanCallingIdentity( () -> callback.onDatagramTransferStateChanged( state, sendPendingCount, receivePendingCount, errorCode))); () -> callback.onSatellitePositionChanged(pointingInfo))); } @Override public void onSatellitePositionChanged(PointingInfo pointingInfo) { public void onSendDatagramStateChanged(int state, int sendPendingCount, int errorCode) { executor.execute(() -> Binder.withCleanCallingIdentity( () -> callback.onSatellitePositionChanged(pointingInfo))); () -> callback.onSendDatagramStateChanged( state, sendPendingCount, errorCode))); } @Override public void onReceiveDatagramStateChanged(int state, int receivePendingCount, int errorCode) { executor.execute(() -> Binder.withCleanCallingIdentity( () -> callback.onReceiveDatagramStateChanged( state, receivePendingCount, errorCode))); } }; sSatelliteTransmissionUpdateCallbackMap.put(callback, internalCallback); Loading telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java +15 −5 Original line number Diff line number Diff line Loading @@ -33,14 +33,24 @@ public interface SatelliteTransmissionUpdateCallback { void onSatellitePositionChanged(@NonNull PointingInfo pointingInfo); /** * Called when satellite datagram transfer state changed. * Called when satellite datagram send state changed. * * @param state The new datagram transfer state. * @param state The new send datagram transfer state. * @param sendPendingCount The number of datagrams that are currently being sent. * @param receivePendingCount The number of datagrams that are currently being received. * @param errorCode If datagram transfer failed, the reason for failure. */ void onDatagramTransferStateChanged(@SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount, int receivePendingCount, void onSendDatagramStateChanged( @SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount, @SatelliteManager.SatelliteError int errorCode); /** * Called when satellite datagram receive state changed. * * @param state The new receive datagram transfer state. * @param receivePendingCount The number of datagrams that are currently pending to be received. * @param errorCode If datagram transfer failed, the reason for failure. */ void onReceiveDatagramStateChanged( @SatelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount, @SatelliteManager.SatelliteError int errorCode); } Loading
telephony/java/android/telephony/satellite/ISatelliteTransmissionUpdateCallback.aidl +12 −5 Original line number Diff line number Diff line Loading @@ -24,15 +24,22 @@ import android.telephony.satellite.PointingInfo; */ oneway interface ISatelliteTransmissionUpdateCallback { /** * Called when satellite datagram transfer state changed. * Called when satellite datagram send state changed. * * @param state The new datagram transfer state. * @param state The new send datagram transfer state. * @param sendPendingCount The number of datagrams that are currently being sent. * @param receivePendingCount The number of datagrams that are currently being received. * @param errorCode If datagram transfer failed, the reason for failure. */ void onDatagramTransferStateChanged(in int state, in int sendPendingCount, in int receivePendingCount, in int errorCode); void onSendDatagramStateChanged(in int state, in int sendPendingCount, in int errorCode); /** * Called when satellite datagram receive state changed. * * @param state The new receive datagram transfer state. * @param receivePendingCount The number of datagrams that are currently pending to be received. * @param errorCode If datagram transfer failed, the reason for failure. */ void onReceiveDatagramStateChanged(in int state, in int receivePendingCount, in int errorCode); /** * Called when the satellite position changed. Loading
telephony/java/android/telephony/satellite/SatelliteManager.java +16 −7 Original line number Diff line number Diff line Loading @@ -647,6 +647,7 @@ public class SatelliteManager { }) @Retention(RetentionPolicy.SOURCE) public @interface SatelliteDatagramTransferState {} // TODO: Split into two enums for sending and receiving states /** * Satellite modem is in idle state. Loading Loading @@ -750,19 +751,27 @@ public class SatelliteManager { }; ISatelliteTransmissionUpdateCallback internalCallback = new ISatelliteTransmissionUpdateCallback.Stub() { @Override public void onDatagramTransferStateChanged(int state, int sendPendingCount, int receivePendingCount, int errorCode) { public void onSatellitePositionChanged(PointingInfo pointingInfo) { executor.execute(() -> Binder.withCleanCallingIdentity( () -> callback.onDatagramTransferStateChanged( state, sendPendingCount, receivePendingCount, errorCode))); () -> callback.onSatellitePositionChanged(pointingInfo))); } @Override public void onSatellitePositionChanged(PointingInfo pointingInfo) { public void onSendDatagramStateChanged(int state, int sendPendingCount, int errorCode) { executor.execute(() -> Binder.withCleanCallingIdentity( () -> callback.onSatellitePositionChanged(pointingInfo))); () -> callback.onSendDatagramStateChanged( state, sendPendingCount, errorCode))); } @Override public void onReceiveDatagramStateChanged(int state, int receivePendingCount, int errorCode) { executor.execute(() -> Binder.withCleanCallingIdentity( () -> callback.onReceiveDatagramStateChanged( state, receivePendingCount, errorCode))); } }; sSatelliteTransmissionUpdateCallbackMap.put(callback, internalCallback); Loading
telephony/java/android/telephony/satellite/SatelliteTransmissionUpdateCallback.java +15 −5 Original line number Diff line number Diff line Loading @@ -33,14 +33,24 @@ public interface SatelliteTransmissionUpdateCallback { void onSatellitePositionChanged(@NonNull PointingInfo pointingInfo); /** * Called when satellite datagram transfer state changed. * Called when satellite datagram send state changed. * * @param state The new datagram transfer state. * @param state The new send datagram transfer state. * @param sendPendingCount The number of datagrams that are currently being sent. * @param receivePendingCount The number of datagrams that are currently being received. * @param errorCode If datagram transfer failed, the reason for failure. */ void onDatagramTransferStateChanged(@SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount, int receivePendingCount, void onSendDatagramStateChanged( @SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount, @SatelliteManager.SatelliteError int errorCode); /** * Called when satellite datagram receive state changed. * * @param state The new receive datagram transfer state. * @param receivePendingCount The number of datagrams that are currently pending to be received. * @param errorCode If datagram transfer failed, the reason for failure. */ void onReceiveDatagramStateChanged( @SatelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount, @SatelliteManager.SatelliteError int errorCode); }