Change SatelliteError to SatelliteResult enum

The following changes are made in this cl:
- SatelliteError is changed to SatelliteResult
- SATELLITE_ERROR_NONE is changed to SATELLITE_RESULT_SUCCESS
- SATELLITE_RESULT prefix is added to all the values in the enum

Bug: 296925011
Test: Flashed device on raven-userdebug and performed basic
functionality tests
- atest android.telephony.satellite.cts
- atest com.android.internal.telephony.satellite
- atest com.google.android.telephony.satellite

Change-Id: I3a1b89d48c2b6f1d908a80876ede2176c1478da9
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index fdb0ead..6ee7251 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -12233,13 +12233,13 @@
      * @param subId The subId of the subscription to register for provision state changed.
      * @param callback The callback to handle the satellite provision state changed event.
      *
-     * @return The {@link SatelliteManager.SatelliteError} result of the operation.
+     * @return The {@link SatelliteManager.SatelliteResult} result of the operation.
      *
      * @throws SecurityException if the caller doesn't have the required permission.
      */
     @Override
-    @SatelliteManager.SatelliteError public int registerForSatelliteProvisionStateChanged(int subId,
-            @NonNull ISatelliteProvisionStateCallback callback) {
+    @SatelliteManager.SatelliteResult public int registerForSatelliteProvisionStateChanged(
+            int subId, @NonNull ISatelliteProvisionStateCallback callback) {
         enforceSatelliteCommunicationPermission("registerForSatelliteProvisionStateChanged");
         return mSatelliteController.registerForSatelliteProvisionStateChanged(subId, callback);
     }
@@ -12283,12 +12283,12 @@
      * @param subId The subId of the subscription to register for satellite modem state changed.
      * @param callback The callback to handle the satellite modem state changed event.
      *
-     * @return The {@link SatelliteManager.SatelliteError} result of the operation.
+     * @return The {@link SatelliteManager.SatelliteResult} result of the operation.
      *
      * @throws SecurityException if the caller doesn't have the required permission.
      */
     @Override
-    @SatelliteManager.SatelliteError public int registerForSatelliteModemStateChanged(int subId,
+    @SatelliteManager.SatelliteResult public int registerForSatelliteModemStateChanged(int subId,
             @NonNull ISatelliteStateCallback callback) {
         enforceSatelliteCommunicationPermission("registerForSatelliteModemStateChanged");
         return mSatelliteController.registerForSatelliteModemStateChanged(subId, callback);
@@ -12317,12 +12317,12 @@
      * @param subId The subId of the subscription to register for incoming satellite datagrams.
      * @param callback The callback to handle incoming datagrams over satellite.
      *
-     * @return The {@link SatelliteManager.SatelliteError} result of the operation.
+     * @return The {@link SatelliteManager.SatelliteResult} result of the operation.
      *
      * @throws SecurityException if the caller doesn't have the required permission.
      */
     @Override
-    @SatelliteManager.SatelliteError public int registerForSatelliteDatagram(int subId,
+    @SatelliteManager.SatelliteResult public int registerForSatelliteDatagram(int subId,
             @NonNull ISatelliteDatagramCallback callback) {
         enforceSatelliteCommunicationPermission("registerForSatelliteDatagram");
         return mSatelliteController.registerForSatelliteDatagram(subId, callback);
@@ -12353,7 +12353,7 @@
      * {@link SatelliteDatagramCallback#onSatelliteDatagramReceived(long, SatelliteDatagram, int, Consumer)})}
      *
      * @param subId The subId of the subscription used for receiving datagrams.
-     * @param callback The callback to get {@link SatelliteManager.SatelliteError} of the request.
+     * @param callback The callback to get {@link SatelliteManager.SatelliteResult} of the request.
      *
      * @throws SecurityException if the caller doesn't have required permission.
      */
@@ -12377,7 +12377,7 @@
      *                 Datagram will be passed down to modem without any encoding or encryption.
      * @param needFullScreenPointingUI this is used to indicate pointingUI app to open in
      *                                 full screen mode.
-     * @param callback The callback to get {@link SatelliteManager.SatelliteError} of the request.
+     * @param callback The callback to get {@link SatelliteManager.SatelliteResult} of the request.
      *
      * @throws SecurityException if the caller doesn't have required permission.
      */
diff --git a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/Datagram.java b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/Datagram.java
index 96a4873..97f676f 100644
--- a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/Datagram.java
+++ b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/Datagram.java
@@ -35,7 +35,7 @@
 import android.telephony.satellite.SatelliteManager;
 import android.telephony.satellite.SatelliteStateCallback;
 import android.telephony.satellite.SatelliteTransmissionUpdateCallback;
-import android.telephony.satellite.stub.SatelliteError;
+import android.telephony.satellite.stub.SatelliteResult;
 import android.util.Log;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -176,7 +176,7 @@
             if (value == null) {
                 showErrorStatusTextView.setText("Timed out to enable the satellite");
                 return;
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 showErrorStatusTextView.setText("Failed to enable satellite, error = "
                         + SatelliteErrorUtils.mapError(value));
                 return;
@@ -191,7 +191,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 textView.setText("Timed out to startSatelliteTransmissionUpdates");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 textView.setText("Failed to startSatelliteTransmissionUpdates with error = "
                         + SatelliteErrorUtils.mapError(value));
             } else {
@@ -210,7 +210,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 textView.setText("Timed out to stopSatelliteTransmissionUpdates");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 textView.setText("Failed to stopSatelliteTransmissionUpdates with error = "
                         + SatelliteErrorUtils.mapError(value));
             } else {
@@ -234,7 +234,7 @@
             if (value == null) {
                 showErrorStatusTextView.setText("Timed out to enable the satellite");
                 return;
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 showErrorStatusTextView.setText("Failed to enable satellite, error = "
                         + SatelliteErrorUtils.mapError(value));
                 return;
@@ -251,7 +251,7 @@
             Integer value = resultListener.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 textView.setText("Timed out for poll message");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 textView.setText("Failed to pollPendingSatelliteDatagrams with error = "
                         + SatelliteErrorUtils.mapError(value));
             } else {
@@ -274,7 +274,7 @@
             Integer value = resultListener.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 textView.setText("Timed out for sendSatelliteDatagram");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 textView.setText("Failed to sendSatelliteDatagram with error = "
                         + SatelliteErrorUtils.mapError(value));
             } else {
diff --git a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/Provisioning.java b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/Provisioning.java
index 5f25dee..940435e 100644
--- a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/Provisioning.java
+++ b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/Provisioning.java
@@ -24,7 +24,7 @@
 import android.os.OutcomeReceiver;
 import android.telephony.satellite.SatelliteManager;
 import android.telephony.satellite.SatelliteProvisionStateCallback;
-import android.telephony.satellite.stub.SatelliteError;
+import android.telephony.satellite.stub.SatelliteResult;
 import android.util.Log;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -96,7 +96,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 textView.setText("Timed out to provision the satellite");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 textView.setText("Failed to provision SatelliteService with error = "
                         + SatelliteErrorUtils.mapError(value));
             } else {
@@ -116,7 +116,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 textView.setText("Timed out to deprovision the satellite");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 textView.setText("Failed to deprovision SatelliteService with error = "
                         + SatelliteErrorUtils.mapError(value));
             } else {
diff --git a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SatelliteControl.java b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SatelliteControl.java
index 1ab9f7c..4e339a3 100644
--- a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SatelliteControl.java
+++ b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SatelliteControl.java
@@ -22,7 +22,7 @@
 import android.os.OutcomeReceiver;
 import android.telephony.satellite.SatelliteCapabilities;
 import android.telephony.satellite.SatelliteManager;
-import android.telephony.satellite.stub.SatelliteError;
+import android.telephony.satellite.stub.SatelliteResult;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.TextView;
@@ -80,7 +80,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 textView.setText("Timed out to enable the satellite");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 textView.setText("Failed to enable the satellite, error ="
                         + SatelliteErrorUtils.mapError(value));
             } else {
@@ -99,7 +99,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 textView.setText("Timed out to disable the satellite");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 textView.setText("Failed to disable the satellite, error ="
                         + SatelliteErrorUtils.mapError(value));
             } else {
diff --git a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SatelliteErrorUtils.java b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SatelliteErrorUtils.java
index a52d3ba..ffdabdf 100644
--- a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SatelliteErrorUtils.java
+++ b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SatelliteErrorUtils.java
@@ -16,7 +16,7 @@
 
 package com.android.phone.testapps.satellitetestapp;
 
-import android.telephony.satellite.stub.SatelliteError;
+import android.telephony.satellite.stub.SatelliteResult;
 import android.util.Log;
 
 /**
@@ -31,48 +31,46 @@
      */
     public static String mapError(int error) {
         switch (error) {
-            case SatelliteError.ERROR_NONE:
-                return "SATELLITE_ERROR_NONE";
-            case SatelliteError.SATELLITE_ERROR:
-                return "SATELLITE_ERROR";
-            case SatelliteError.SERVER_ERROR:
-                return "SATELLITE_SERVER_ERROR";
-            case SatelliteError.SERVICE_ERROR:
-                return "SATELLITE_SERVICE_ERROR";
-            case SatelliteError.MODEM_ERROR:
-                return "SATELLITE_MODEM_ERROR";
-            case SatelliteError.NETWORK_ERROR:
-                return "SATELLITE_NETWORK_ERROR";
-            case SatelliteError.INVALID_TELEPHONY_STATE:
-                return "SATELLITE_INVALID_TELEPHONY_STATE";
-            case SatelliteError.INVALID_MODEM_STATE:
-                return "SATELLITE_INVALID_MODEM_STATE";
-            case SatelliteError.INVALID_ARGUMENTS:
-                return "SATELLITE_INVALID_ARGUMENTS";
-            case SatelliteError.REQUEST_FAILED:
-                return "SATELLITE_REQUEST_FAILED";
-            case SatelliteError.RADIO_NOT_AVAILABLE:
-                return "SATELLITE_RADIO_NOT_AVAILABLE";
-            case SatelliteError.REQUEST_NOT_SUPPORTED:
-                return "SATELLITE_REQUEST_NOT_SUPPORTED";
-            case SatelliteError.NO_RESOURCES:
-                return "SATELLITE_NO_RESOURCES";
-            case SatelliteError.SERVICE_NOT_PROVISIONED:
-                return "SATELLITE_SERVICE_NOT_PROVISIONED";
-            case SatelliteError.SERVICE_PROVISION_IN_PROGRESS:
-                return "SATELLITE_SERVICE_PROVISION_IN_PROGRESS";
-            case SatelliteError.REQUEST_ABORTED:
-                return "SATELLITE_REQUEST_ABORTED";
-            case SatelliteError.SATELLITE_ACCESS_BARRED:
-                return "SATELLITE_ACCESS_BARRED";
-            case SatelliteError.NETWORK_TIMEOUT:
-                return "SATELLITE_NETWORK_TIMEOUT";
-            case SatelliteError.SATELLITE_NOT_REACHABLE:
-                return "SATELLITE_NOT_REACHABLE";
-            case SatelliteError.NOT_AUTHORIZED:
-                return "SATELLITE_NOT_AUTHORIZED";
+            case SatelliteResult.SATELLITE_RESULT_SUCCESS:
+                return "SATELLITE_RESULT_SUCCESS";
+            case SatelliteResult.SATELLITE_RESULT_ERROR:
+                return "SATELLITE_RESULT_ERROR";
+            case SatelliteResult.SATELLITE_RESULT_SERVER_ERROR:
+                return "SATELLITE_RESULT_SERVER_ERROR";
+            case SatelliteResult.SATELLITE_RESULT_SERVICE_ERROR:
+                return "SATELLITE_RESULT_SERVICE_ERROR";
+            case SatelliteResult.SATELLITE_RESULT_MODEM_ERROR:
+                return "SATELLITE_RESULT_MODEM_ERROR";
+            case SatelliteResult.SATELLITE_RESULT_NETWORK_ERROR:
+                return "SATELLITE_RESULT_NETWORK_ERROR";
+            case SatelliteResult.SATELLITE_RESULT_INVALID_MODEM_STATE:
+                return "SATELLITE_RESULT_INVALID_MODEM_STATE";
+            case SatelliteResult.SATELLITE_RESULT_INVALID_ARGUMENTS:
+                return "SATELLITE_RESULT_INVALID_ARGUMENTS";
+            case SatelliteResult.SATELLITE_RESULT_REQUEST_FAILED:
+                return "SATELLITE_RESULT_REQUEST_FAILED";
+            case SatelliteResult.SATELLITE_RESULT_RADIO_NOT_AVAILABLE:
+                return "SATELLITE_RESULT_RADIO_NOT_AVAILABLE";
+            case SatelliteResult.SATELLITE_RESULT_REQUEST_NOT_SUPPORTED:
+                return "SATELLITE_RESULT_REQUEST_NOT_SUPPORTED";
+            case SatelliteResult.SATELLITE_RESULT_NO_RESOURCES:
+                return "SATELLITE_RESULT_NO_RESOURCES";
+            case SatelliteResult.SATELLITE_RESULT_SERVICE_NOT_PROVISIONED:
+                return "SATELLITE_RESULT_SERVICE_NOT_PROVISIONED";
+            case SatelliteResult.SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS:
+                return "SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS";
+            case SatelliteResult.SATELLITE_RESULT_REQUEST_ABORTED:
+                return "SATELLITE_RESULT_REQUEST_ABORTED";
+            case SatelliteResult.SATELLITE_RESULT_ACCESS_BARRED:
+                return "SATELLITE_RESULT_ACCESS_BARRED";
+            case SatelliteResult.SATELLITE_RESULT_NETWORK_TIMEOUT:
+                return "SATELLITE_RESULT_NETWORK_TIMEOUT";
+            case SatelliteResult.SATELLITE_RESULT_NOT_REACHABLE:
+                return "SATELLITE_RESULT_NOT_REACHABLE";
+            case SatelliteResult.SATELLITE_RESULT_NOT_AUTHORIZED:
+                return "SATELLITE_RESULT_NOT_AUTHORIZED";
         }
         Log.d(TAG, "Received invalid satellite service error: " + error);
-        return "SATELLITE_SERVICE_ERROR";
+        return "SATELLITE_RESULT_SERVICE_ERROR";
     }
 }
diff --git a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SendReceive.java b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SendReceive.java
index 4a9d006..a64aa5d 100644
--- a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SendReceive.java
+++ b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/SendReceive.java
@@ -27,7 +27,7 @@
 import android.telephony.satellite.SatelliteDatagramCallback;
 import android.telephony.satellite.SatelliteManager;
 import android.telephony.satellite.SatelliteTransmissionUpdateCallback;
-import android.telephony.satellite.stub.SatelliteError;
+import android.telephony.satellite.stub.SatelliteResult;
 import android.util.Log;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -131,7 +131,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 messageStatusTextView.setText("Timed out to send the message");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 messageStatusTextView.setText("Failed to send the message, error ="
                         + SatelliteErrorUtils.mapError(value));
             } else {
@@ -150,7 +150,7 @@
 
         int result = mSatelliteManager.registerForSatelliteDatagram(Runnable::run, mCallback);
         TextView showErrorStatusTextView = findViewById(R.id.showErrorStatus);
-        if (result != SatelliteError.ERROR_NONE) {
+        if (result != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             showErrorStatusTextView.setText("Status for registerForSatelliteDatagram : "
                     + SatelliteErrorUtils.mapError(result));
         }
@@ -162,7 +162,7 @@
             Integer value = resultListener.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 showErrorStatusTextView.setText("Timed out to enable the satellite");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 showErrorStatusTextView.setText("Failed to enable satellite, error = "
                         + SatelliteErrorUtils.mapError(value));
                 return;
@@ -178,7 +178,7 @@
             Integer value = resultListener.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 mMessageStatusTextView.setText("Timed out to poll pending messages");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 mMessageStatusTextView.setText("Failed to poll pending messages, error = "
                         + SatelliteErrorUtils.mapError(value));
             }  else {
@@ -201,7 +201,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 showErrorStatusTextView.setText("Timed out to provision the satellite");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 showErrorStatusTextView.setText("Failed to provision satellite, error = "
                         + SatelliteErrorUtils.mapError(value));
                 return;
@@ -243,7 +243,7 @@
             Integer value = error.poll(TIMEOUT, TimeUnit.MILLISECONDS);
             if (value == null) {
                 showErrorStatusTextView.setText("Timed out to enable the satellite");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 showErrorStatusTextView.setText("Failed to enable satellite, error = "
                         + SatelliteErrorUtils.mapError(value));
                 return;
@@ -269,7 +269,7 @@
             if (value == null) {
                 satellitePositionTextView.setText("Failed to register for satellite transmission"
                         + "updates");
-            } else if (value != SatelliteError.ERROR_NONE) {
+            } else if (value != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
                 satellitePositionTextView.setText("Failed to register for satellite transmission "
                         + "updates, error = " + SatelliteErrorUtils.mapError(value));
             }
diff --git a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/TestSatelliteService.java b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/TestSatelliteService.java
index a4c0a83..af3da0b 100644
--- a/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/TestSatelliteService.java
+++ b/testapps/TestSatelliteApp/src/com/android/phone/testapps/satellitetestapp/TestSatelliteService.java
@@ -30,9 +30,9 @@
 import android.telephony.satellite.stub.PointingInfo;
 import android.telephony.satellite.stub.SatelliteCapabilities;
 import android.telephony.satellite.stub.SatelliteDatagram;
-import android.telephony.satellite.stub.SatelliteError;
 import android.telephony.satellite.stub.SatelliteImplBase;
 import android.telephony.satellite.stub.SatelliteModemState;
+import android.telephony.satellite.stub.SatelliteResult;
 import android.telephony.satellite.stub.SatelliteService;
 import android.util.Log;
 
@@ -75,8 +75,8 @@
     private final Map<IBinder, ISatelliteListener> mRemoteListeners = new HashMap<>();
     @Nullable private ILocalSatelliteListener mLocalListener;
     private final LocalBinder mBinder = new LocalBinder();
-    @SatelliteError
-    private int mErrorCode = SatelliteError.ERROR_NONE;
+    @SatelliteResult
+    private int mErrorCode = SatelliteResult.SATELLITE_RESULT_SUCCESS;
 
     // For local access of this Service.
     class LocalBinder extends Binder {
@@ -158,7 +158,7 @@
         if (!verifySatelliteModemState(errorCallback)) {
             return;
         }
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -168,14 +168,14 @@
         } else {
             updateSatelliteModemState(SatelliteModemState.SATELLITE_MODEM_STATE_IDLE);
         }
-        runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+        runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
     }
 
     @Override
     public void requestSatelliteEnabled(boolean enableSatellite, boolean enableDemoMode,
             @NonNull IIntegerConsumer errorCallback) {
         logd("requestSatelliteEnabled: mErrorCode=" + mErrorCode + " enable = " + enableSatellite);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -190,20 +190,20 @@
     private void enableSatellite(@NonNull IIntegerConsumer errorCallback) {
         mIsEnabled = true;
         updateSatelliteModemState(SatelliteModemState.SATELLITE_MODEM_STATE_IDLE);
-        runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+        runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
     }
 
     private void disableSatellite(@NonNull IIntegerConsumer errorCallback) {
         mIsEnabled = false;
         updateSatelliteModemState(SatelliteModemState.SATELLITE_MODEM_STATE_OFF);
-        runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+        runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
     }
 
     @Override
     public void requestIsSatelliteEnabled(@NonNull IIntegerConsumer errorCallback,
             @NonNull IBooleanConsumer callback) {
         logd("requestIsSatelliteEnabled: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -214,7 +214,7 @@
     public void requestIsSatelliteSupported(@NonNull IIntegerConsumer errorCallback,
             @NonNull IBooleanConsumer callback) {
         logd("requestIsSatelliteSupported");
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -225,7 +225,7 @@
     public void requestSatelliteCapabilities(@NonNull IIntegerConsumer errorCallback,
             @NonNull ISatelliteCapabilitiesConsumer callback) {
         logd("requestSatelliteCapabilities: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -251,10 +251,10 @@
             return;
         }
 
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
         } else {
-            runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+            runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
         }
 
         if (mLocalListener != null) {
@@ -267,10 +267,10 @@
     @Override
     public void stopSendingSatellitePointingInfo(@NonNull IIntegerConsumer errorCallback) {
         logd("stopSendingSatellitePointingInfo: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
         } else {
-            runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+            runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
         }
 
         if (mLocalListener != null) {
@@ -284,11 +284,11 @@
     public void provisionSatelliteService(@NonNull String token, @NonNull byte[] provisionData,
             @NonNull IIntegerConsumer errorCallback) {
         logd("provisionSatelliteService: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
-        runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+        runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
         updateSatelliteProvisionState(true);
     }
 
@@ -296,11 +296,11 @@
     public void deprovisionSatelliteService(@NonNull String token,
             @NonNull IIntegerConsumer errorCallback) {
         logd("deprovisionSatelliteService: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
-        runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+        runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
         updateSatelliteProvisionState(false);
     }
 
@@ -308,7 +308,7 @@
     public void requestIsSatelliteProvisioned(@NonNull IIntegerConsumer errorCallback,
             @NonNull IBooleanConsumer callback) {
         logd("requestIsSatelliteProvisioned: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -318,10 +318,10 @@
     @Override
     public void pollPendingSatelliteDatagrams(@NonNull IIntegerConsumer errorCallback) {
         logd("pollPendingSatelliteDatagrams: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
         } else {
-            runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+            runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
         }
 
         if (mLocalListener != null) {
@@ -335,10 +335,10 @@
     public void sendSatelliteDatagram(@NonNull SatelliteDatagram datagram, boolean isEmergency,
             @NonNull IIntegerConsumer errorCallback) {
         logd("sendSatelliteDatagram: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
         } else {
-            runWithExecutor(() -> errorCallback.accept(SatelliteError.ERROR_NONE));
+            runWithExecutor(() -> errorCallback.accept(SatelliteResult.SATELLITE_RESULT_SUCCESS));
         }
 
         if (mLocalListener != null) {
@@ -352,7 +352,7 @@
     public void requestSatelliteModemState(@NonNull IIntegerConsumer errorCallback,
             @NonNull IIntegerConsumer callback) {
         logd("requestSatelliteModemState: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -363,7 +363,7 @@
     public void requestIsSatelliteCommunicationAllowedForCurrentLocation(
             @NonNull IIntegerConsumer errorCallback, @NonNull IBooleanConsumer callback) {
         logd("requestIsSatelliteCommunicationAllowedForCurrentLocation: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -379,7 +379,7 @@
     public void requestTimeForNextSatelliteVisibility(@NonNull IIntegerConsumer errorCallback,
             @NonNull IIntegerConsumer callback) {
         logd("requestTimeForNextSatelliteVisibility: mErrorCode=" + mErrorCode);
-        if (mErrorCode != SatelliteError.ERROR_NONE) {
+        if (mErrorCode != SatelliteResult.SATELLITE_RESULT_SUCCESS) {
             runWithExecutor(() -> errorCallback.accept(mErrorCode));
             return;
         }
@@ -391,7 +391,7 @@
         mLocalListener = listener;
     }
 
-    public void setErrorCode(@SatelliteError int errorCode) {
+    public void setErrorCode(@SatelliteResult int errorCode) {
         logd("setErrorCode: errorCode=" + errorCode);
         mErrorCode = errorCode;
     }
@@ -429,15 +429,18 @@
      */
     private boolean verifySatelliteModemState(@NonNull IIntegerConsumer errorCallback) {
         if (!mIsSupported) {
-            runWithExecutor(() -> errorCallback.accept(SatelliteError.REQUEST_NOT_SUPPORTED));
+            runWithExecutor(() -> errorCallback.accept(
+                    SatelliteResult.SATELLITE_RESULT_REQUEST_NOT_SUPPORTED));
             return false;
         }
         if (!mIsProvisioned) {
-            runWithExecutor(() -> errorCallback.accept(SatelliteError.SERVICE_NOT_PROVISIONED));
+            runWithExecutor(() -> errorCallback.accept(
+                    SatelliteResult.SATELLITE_RESULT_SERVICE_NOT_PROVISIONED));
             return false;
         }
         if (!mIsEnabled) {
-            runWithExecutor(() -> errorCallback.accept(SatelliteError.INVALID_MODEM_STATE));
+            runWithExecutor(() -> errorCallback.accept(
+                    SatelliteResult.SATELLITE_RESULT_INVALID_MODEM_STATE));
             return false;
         }
         return true;