diff options
2 files changed, 69 insertions, 69 deletions
diff --git a/satellite_client/src/android/telephony/satellite/wrapper/SatelliteManagerWrapper.java b/satellite_client/src/android/telephony/satellite/wrapper/SatelliteManagerWrapper.java index b13a0fc..de3a8a4 100644 --- a/satellite_client/src/android/telephony/satellite/wrapper/SatelliteManagerWrapper.java +++ b/satellite_client/src/android/telephony/satellite/wrapper/SatelliteManagerWrapper.java @@ -224,104 +224,104 @@ public class SatelliteManagerWrapper { public @interface SatelliteDatagramTransferState {} /** The request was successfully processed. */ - public static final int SATELLITE_ERROR_NONE = 0; + public static final int SATELLITE_RESULT_SUCCESS = 0; /** A generic error which should be used only when other specific errors cannot be used. */ - public static final int SATELLITE_ERROR = 1; + public static final int SATELLITE_RESULT_ERROR = 1; /** Error received from the satellite server. */ - public static final int SATELLITE_SERVER_ERROR = 2; + public static final int SATELLITE_RESULT_SERVER_ERROR = 2; /** * Error received from the vendor service. This generic error code should be used only when the * error cannot be mapped to other specific service error codes. */ - public static final int SATELLITE_SERVICE_ERROR = 3; + public static final int SATELLITE_RESULT_SERVICE_ERROR = 3; /** * Error received from satellite modem. This generic error code should be used only when the error * cannot be mapped to other specific modem error codes. */ - public static final int SATELLITE_MODEM_ERROR = 4; + public static final int SATELLITE_RESULT_MODEM_ERROR = 4; /** * Error received from the satellite network. This generic error code should be used only when the * error cannot be mapped to other specific network error codes. */ - public static final int SATELLITE_NETWORK_ERROR = 5; + public static final int SATELLITE_RESULT_NETWORK_ERROR = 5; /** Telephony is not in a valid state to receive requests from clients. */ - public static final int SATELLITE_INVALID_TELEPHONY_STATE = 6; + public static final int SATELLITE_RESULT_INVALID_TELEPHONY_STATE = 6; /** Satellite modem is not in a valid state to receive requests from clients. */ - public static final int SATELLITE_INVALID_MODEM_STATE = 7; + public static final int SATELLITE_RESULT_INVALID_MODEM_STATE = 7; /** * Either vendor service, or modem, or Telephony framework has received a request with invalid * arguments from its clients. */ - public static final int SATELLITE_INVALID_ARGUMENTS = 8; + public static final int SATELLITE_RESULT_INVALID_ARGUMENTS = 8; /** * Telephony framework failed to send a request or receive a response from the vendor service or * satellite modem due to internal error. */ - public static final int SATELLITE_REQUEST_FAILED = 9; + public static final int SATELLITE_RESULT_REQUEST_FAILED = 9; /** Radio did not start or is resetting. */ - public static final int SATELLITE_RADIO_NOT_AVAILABLE = 10; + public static final int SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 10; /** The request is not supported by either the satellite modem or the network. */ - public static final int SATELLITE_REQUEST_NOT_SUPPORTED = 11; + public static final int SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 11; /** Satellite modem or network has no resources available to handle requests from clients. */ - public static final int SATELLITE_NO_RESOURCES = 12; + public static final int SATELLITE_RESULT_NO_RESOURCES = 12; /** Satellite service is not provisioned yet. */ - public static final int SATELLITE_SERVICE_NOT_PROVISIONED = 13; + public static final int SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 13; /** Satellite service provision is already in progress. */ - public static final int SATELLITE_SERVICE_PROVISION_IN_PROGRESS = 14; + public static final int SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 14; /** * The ongoing request was aborted by either the satellite modem or the network. This error is * also returned when framework decides to abort current send request as one of the previous send * request failed. */ - public static final int SATELLITE_REQUEST_ABORTED = 15; + public static final int SATELLITE_RESULT_REQUEST_ABORTED = 15; /** The device/subscriber is barred from accessing the satellite service. */ - public static final int SATELLITE_ACCESS_BARRED = 16; + public static final int SATELLITE_RESULT_ACCESS_BARRED = 16; /** * Satellite modem timeout to receive ACK or response from the satellite network after sending a * request to the network. */ - public static final int SATELLITE_NETWORK_TIMEOUT = 17; + public static final int SATELLITE_RESULT_NETWORK_TIMEOUT = 17; /** Satellite network is not reachable from the modem. */ - public static final int SATELLITE_NOT_REACHABLE = 18; + public static final int SATELLITE_RESULT_NOT_REACHABLE = 18; /** The device/subscriber is not authorized to register with the satellite service provider. */ - public static final int SATELLITE_NOT_AUTHORIZED = 19; + public static final int SATELLITE_RESULT_NOT_AUTHORIZED = 19; /** The device does not support satellite. */ - public static final int SATELLITE_NOT_SUPPORTED = 20; + public static final int SATELLITE_RESULT_NOT_SUPPORTED = 20; /** The current request is already in-progress. */ - public static final int SATELLITE_REQUEST_IN_PROGRESS = 21; + public static final int SATELLITE_RESULT_REQUEST_IN_PROGRESS = 21; /** Satellite modem is currently busy due to which current request cannot be processed. */ - public static final int SATELLITE_MODEM_BUSY = 22; + public static final int SATELLITE_RESULT_MODEM_BUSY = 22; /** @hide */ @IntDef( - prefix = {"SATELLITE_"}, + prefix = {"SATELLITE_RESULT_"}, value = { - SATELLITE_ERROR_NONE, - SATELLITE_ERROR, - SATELLITE_SERVER_ERROR, - SATELLITE_SERVICE_ERROR, - SATELLITE_MODEM_ERROR, - SATELLITE_NETWORK_ERROR, - SATELLITE_INVALID_TELEPHONY_STATE, - SATELLITE_INVALID_MODEM_STATE, - SATELLITE_INVALID_ARGUMENTS, - SATELLITE_REQUEST_FAILED, - SATELLITE_RADIO_NOT_AVAILABLE, - SATELLITE_REQUEST_NOT_SUPPORTED, - SATELLITE_NO_RESOURCES, - SATELLITE_SERVICE_NOT_PROVISIONED, - SATELLITE_SERVICE_PROVISION_IN_PROGRESS, - SATELLITE_REQUEST_ABORTED, - SATELLITE_ACCESS_BARRED, - SATELLITE_NETWORK_TIMEOUT, - SATELLITE_NOT_REACHABLE, - SATELLITE_NOT_AUTHORIZED, - SATELLITE_NOT_SUPPORTED, - SATELLITE_REQUEST_IN_PROGRESS, - SATELLITE_MODEM_BUSY + SATELLITE_RESULT_SUCCESS, + SATELLITE_RESULT_ERROR, + SATELLITE_RESULT_SERVER_ERROR, + SATELLITE_RESULT_SERVICE_ERROR, + SATELLITE_RESULT_MODEM_ERROR, + SATELLITE_RESULT_NETWORK_ERROR, + SATELLITE_RESULT_INVALID_TELEPHONY_STATE, + SATELLITE_RESULT_INVALID_MODEM_STATE, + SATELLITE_RESULT_INVALID_ARGUMENTS, + SATELLITE_RESULT_REQUEST_FAILED, + SATELLITE_RESULT_RADIO_NOT_AVAILABLE, + SATELLITE_RESULT_REQUEST_NOT_SUPPORTED, + SATELLITE_RESULT_NO_RESOURCES, + SATELLITE_RESULT_SERVICE_NOT_PROVISIONED, + SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS, + SATELLITE_RESULT_REQUEST_ABORTED, + SATELLITE_RESULT_ACCESS_BARRED, + SATELLITE_RESULT_NETWORK_TIMEOUT, + SATELLITE_RESULT_NOT_REACHABLE, + SATELLITE_RESULT_NOT_AUTHORIZED, + SATELLITE_RESULT_NOT_SUPPORTED, + SATELLITE_RESULT_REQUEST_IN_PROGRESS, + SATELLITE_RESULT_MODEM_BUSY }) @Retention(RetentionPolicy.SOURCE) - public @interface SatelliteError {} + public @interface SatelliteResult {} /** Suggested device hold position is unknown. */ public static final int DEVICE_HOLD_POSITION_UNKNOWN = 0; @@ -344,7 +344,7 @@ public class SatelliteManagerWrapper { @Retention(RetentionPolicy.SOURCE) public @interface DeviceHoldPosition {} - /** Exception from the satellite service containing the {@link SatelliteError} error code. */ + /** Exception from the satellite service containing the {@link SatelliteResult} error code. */ public static class SatelliteExceptionWrapper extends Exception { private final int mErrorCode; @@ -368,7 +368,7 @@ public class SatelliteManagerWrapper { boolean enableSatellite, boolean enableDemoMode, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { mSatelliteManager.requestSatelliteEnabled( enableSatellite, enableDemoMode, executor, resultListener); } @@ -458,13 +458,13 @@ public class SatelliteManagerWrapper { * Start receiving satellite transmission updates. This can be called by the pointing UI when the * user starts pointing to the satellite. Modem should continue to report the pointing input as * the device or satellite moves. Satellite transmission updates are started only on {@link - * #SATELLITE_ERROR_NONE}. All other results indicate that this operation failed. Once satellite - * transmission updates begin, position and datagram transfer state updates will be sent through - * {@link SatelliteTransmissionUpdateCallback}. + * #SATELLITE_RESULT_SUCCESS}. All other results indicate that this operation failed. + * Once satellite transmission updates begin, position and datagram transfer state updates + * will be sent through {@link SatelliteTransmissionUpdateCallback}. */ public void startSatelliteTransmissionUpdates( @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener, + @SatelliteResult @NonNull Consumer<Integer> resultListener, @NonNull SatelliteTransmissionUpdateCallbackWrapper callback) { SatelliteTransmissionUpdateCallback internalCallback = @@ -474,7 +474,7 @@ public class SatelliteManagerWrapper { public void onSendDatagramStateChanged( @SatelliteDatagramTransferState int state, int sendPendingCount, - @SatelliteError int errorCode) { + @SatelliteResult int errorCode) { callback.onSendDatagramStateChanged(state, sendPendingCount, errorCode); } @@ -482,7 +482,7 @@ public class SatelliteManagerWrapper { public void onReceiveDatagramStateChanged( @SatelliteDatagramTransferState int state, int receivePendingCount, - @SatelliteError int errorCode) { + @SatelliteResult int errorCode) { callback.onReceiveDatagramStateChanged(state, receivePendingCount, errorCode); } @@ -502,13 +502,13 @@ public class SatelliteManagerWrapper { /** * Stop receiving satellite transmission updates. This can be called by the pointing UI when the * user stops pointing to the satellite. Satellite transmission updates are stopped and the - * callback is unregistered only on {@link #SATELLITE_ERROR_NONE}. All other results that this + * callback is unregistered only on {@link #SATELLITE_RESULT_SUCCESS}. All other results that this * operation failed. */ public void stopSatelliteTransmissionUpdates( @NonNull SatelliteTransmissionUpdateCallbackWrapper callback, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { SatelliteTransmissionUpdateCallback internalCallback = sSatelliteTransmissionUpdateCallbackWrapperMap.get(callback); if (internalCallback != null) { @@ -526,7 +526,7 @@ public class SatelliteManagerWrapper { @NonNull byte[] provisionData, @Nullable CancellationSignal cancellationSignal, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { mSatelliteManager.provisionSatelliteService( token, provisionData, cancellationSignal, executor, resultListener); } @@ -540,12 +540,12 @@ public class SatelliteManagerWrapper { public void deprovisionSatelliteService( @NonNull String token, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { mSatelliteManager.deprovisionSatelliteService(token, executor, resultListener); } /** Registers for the satellite provision state changed. */ - @SatelliteError + @SatelliteResult public int registerForSatelliteProvisionStateChanged( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteProvisionStateCallbackWrapper callback) { @@ -595,7 +595,7 @@ public class SatelliteManagerWrapper { } /** Registers for modem state changed from satellite modem. */ - @SatelliteError + @SatelliteResult public int registerForSatelliteModemStateChanged( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteStateCallbackWrapper callback) { @@ -625,7 +625,7 @@ public class SatelliteManagerWrapper { } /** Register to receive incoming datagrams over satellite. */ - @SatelliteError + @SatelliteResult public int registerForSatelliteDatagram( @NonNull @CallbackExecutor Executor executor, @NonNull SatelliteDatagramCallbackWrapper callback) { @@ -663,7 +663,7 @@ public class SatelliteManagerWrapper { /** Poll pending satellite datagrams over satellite. */ public void pollPendingSatelliteDatagrams( @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { mSatelliteManager.pollPendingSatelliteDatagrams(executor, resultListener); } @@ -679,7 +679,7 @@ public class SatelliteManagerWrapper { @NonNull SatelliteDatagramWrapper datagram, boolean needFullScreenPointingUI, @NonNull @CallbackExecutor Executor executor, - @SatelliteError @NonNull Consumer<Integer> resultListener) { + @SatelliteResult @NonNull Consumer<Integer> resultListener) { SatelliteDatagram datagramInternal = new SatelliteDatagram(datagram.getSatelliteDatagram()); mSatelliteManager.sendSatelliteDatagram( datagramType, datagramInternal, needFullScreenPointingUI, executor, resultListener); @@ -730,8 +730,8 @@ public class SatelliteManagerWrapper { /** * Inform whether the device is aligned with the satellite for demo mode. */ - public void onDeviceAlignedWithSatellite(boolean isAligned) { - mSatelliteManager.onDeviceAlignedWithSatellite(isAligned); + public void setDeviceAlignedWithSatellite(boolean isAligned) { + mSatelliteManager.setDeviceAlignedWithSatellite(isAligned); } private Map<Integer, AntennaPositionWrapper> transformToAntennaPositionWrapperMap( diff --git a/satellite_client/src/android/telephony/satellite/wrapper/SatelliteTransmissionUpdateCallbackWrapper.java b/satellite_client/src/android/telephony/satellite/wrapper/SatelliteTransmissionUpdateCallbackWrapper.java index c65f4f6..381b397 100644 --- a/satellite_client/src/android/telephony/satellite/wrapper/SatelliteTransmissionUpdateCallbackWrapper.java +++ b/satellite_client/src/android/telephony/satellite/wrapper/SatelliteTransmissionUpdateCallbackWrapper.java @@ -40,7 +40,7 @@ public interface SatelliteTransmissionUpdateCallbackWrapper { void onSendDatagramStateChanged( @SatelliteManagerWrapper.SatelliteDatagramTransferState int state, int sendPendingCount, - @SatelliteManagerWrapper.SatelliteError int errorCode); + @SatelliteManagerWrapper.SatelliteResult int errorCode); /** * Called when satellite datagram receive state changed. @@ -52,5 +52,5 @@ public interface SatelliteTransmissionUpdateCallbackWrapper { void onReceiveDatagramStateChanged( @SatelliteManagerWrapper.SatelliteDatagramTransferState int state, int receivePendingCount, - @SatelliteManagerWrapper.SatelliteError int errorCode); + @SatelliteManagerWrapper.SatelliteResult int errorCode); } |