Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99adb871 authored by Aishwarya Mallamapti's avatar Aishwarya Mallamapti
Browse files

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: If189b1df0ea99b056c38c1ab3f0a8ce308751160
parent e5ef19d4
Loading
Loading
Loading
Loading
+23 −23
Original line number Diff line number Diff line
@@ -17272,7 +17272,6 @@ package android.telephony.satellite {
    field public static final int NT_RADIO_TECHNOLOGY_NR_NTN = 2; // 0x2
    field public static final int NT_RADIO_TECHNOLOGY_PROPRIETARY = 4; // 0x4
    field public static final int NT_RADIO_TECHNOLOGY_UNKNOWN = 0; // 0x0
    field public static final int SATELLITE_ACCESS_BARRED = 16; // 0x10
    field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_IDLE = 0; // 0x0
    field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_FAILED = 7; // 0x7
    field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_NONE = 6; // 0x6
@@ -17282,13 +17281,6 @@ package android.telephony.satellite {
    field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED = 3; // 0x3
    field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS = 2; // 0x2
    field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN = -1; // 0xffffffff
    field public static final int SATELLITE_ERROR = 1; // 0x1
    field public static final int SATELLITE_ERROR_NONE = 0; // 0x0
    field public static final int SATELLITE_INVALID_ARGUMENTS = 8; // 0x8
    field public static final int SATELLITE_INVALID_MODEM_STATE = 7; // 0x7
    field public static final int SATELLITE_INVALID_TELEPHONY_STATE = 6; // 0x6
    field public static final int SATELLITE_MODEM_BUSY = 22; // 0x16
    field public static final int SATELLITE_MODEM_ERROR = 4; // 0x4
    field public static final int SATELLITE_MODEM_STATE_DATAGRAM_RETRYING = 3; // 0x3
    field public static final int SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING = 2; // 0x2
    field public static final int SATELLITE_MODEM_STATE_IDLE = 0; // 0x0
@@ -17296,21 +17288,29 @@ package android.telephony.satellite {
    field public static final int SATELLITE_MODEM_STATE_OFF = 4; // 0x4
    field public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5; // 0x5
    field public static final int SATELLITE_MODEM_STATE_UNKNOWN = -1; // 0xffffffff
    field public static final int SATELLITE_NETWORK_ERROR = 5; // 0x5
    field public static final int SATELLITE_NETWORK_TIMEOUT = 17; // 0x11
    field public static final int SATELLITE_NOT_AUTHORIZED = 19; // 0x13
    field public static final int SATELLITE_NOT_REACHABLE = 18; // 0x12
    field public static final int SATELLITE_NOT_SUPPORTED = 20; // 0x14
    field public static final int SATELLITE_NO_RESOURCES = 12; // 0xc
    field public static final int SATELLITE_RADIO_NOT_AVAILABLE = 10; // 0xa
    field public static final int SATELLITE_REQUEST_ABORTED = 15; // 0xf
    field public static final int SATELLITE_REQUEST_FAILED = 9; // 0x9
    field public static final int SATELLITE_REQUEST_IN_PROGRESS = 21; // 0x15
    field public static final int SATELLITE_REQUEST_NOT_SUPPORTED = 11; // 0xb
    field public static final int SATELLITE_SERVER_ERROR = 2; // 0x2
    field public static final int SATELLITE_SERVICE_ERROR = 3; // 0x3
    field public static final int SATELLITE_SERVICE_NOT_PROVISIONED = 13; // 0xd
    field public static final int SATELLITE_SERVICE_PROVISION_IN_PROGRESS = 14; // 0xe
    field public static final int SATELLITE_RESULT_ACCESS_BARRED = 16; // 0x10
    field public static final int SATELLITE_RESULT_ERROR = 1; // 0x1
    field public static final int SATELLITE_RESULT_INVALID_ARGUMENTS = 8; // 0x8
    field public static final int SATELLITE_RESULT_INVALID_MODEM_STATE = 7; // 0x7
    field public static final int SATELLITE_RESULT_INVALID_TELEPHONY_STATE = 6; // 0x6
    field public static final int SATELLITE_RESULT_MODEM_BUSY = 22; // 0x16
    field public static final int SATELLITE_RESULT_MODEM_ERROR = 4; // 0x4
    field public static final int SATELLITE_RESULT_NETWORK_ERROR = 5; // 0x5
    field public static final int SATELLITE_RESULT_NETWORK_TIMEOUT = 17; // 0x11
    field public static final int SATELLITE_RESULT_NOT_AUTHORIZED = 19; // 0x13
    field public static final int SATELLITE_RESULT_NOT_REACHABLE = 18; // 0x12
    field public static final int SATELLITE_RESULT_NOT_SUPPORTED = 20; // 0x14
    field public static final int SATELLITE_RESULT_NO_RESOURCES = 12; // 0xc
    field public static final int SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 10; // 0xa
    field public static final int SATELLITE_RESULT_REQUEST_ABORTED = 15; // 0xf
    field public static final int SATELLITE_RESULT_REQUEST_FAILED = 9; // 0x9
    field public static final int SATELLITE_RESULT_REQUEST_IN_PROGRESS = 21; // 0x15
    field public static final int SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 11; // 0xb
    field public static final int SATELLITE_RESULT_SERVER_ERROR = 2; // 0x2
    field public static final int SATELLITE_RESULT_SERVICE_ERROR = 3; // 0x3
    field public static final int SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 13; // 0xd
    field public static final int SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 14; // 0xe
    field public static final int SATELLITE_RESULT_SUCCESS = 0; // 0x0
  }
  public static class SatelliteManager.SatelliteException extends java.lang.Exception {
+108 −108

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ public interface SatelliteTransmissionUpdateCallback {
     */
    void onSendDatagramStateChanged(
            @SatelliteManager.SatelliteDatagramTransferState int state, int sendPendingCount,
            @SatelliteManager.SatelliteError int errorCode);
            @SatelliteManager.SatelliteResult int errorCode);

    /**
     * Called when satellite datagram receive state changed.
@@ -54,5 +54,5 @@ public interface SatelliteTransmissionUpdateCallback {
     */
    void onReceiveDatagramStateChanged(
            @SatelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount,
            @SatelliteManager.SatelliteError int errorCode);
            @SatelliteManager.SatelliteResult int errorCode);
}
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package android.telephony.satellite.stub;
import android.telephony.satellite.stub.NTRadioTechnology;
import android.telephony.satellite.stub.PointingInfo;
import android.telephony.satellite.stub.SatelliteDatagram;
import android.telephony.satellite.stub.SatelliteError;
import android.telephony.satellite.stub.SatelliteModemState;

/**
+20 −24
Original line number Diff line number Diff line
@@ -20,91 +20,87 @@ package android.telephony.satellite.stub;
 * {@hide}
 */
@Backing(type="int")
enum SatelliteError {
enum SatelliteResult {
    /**
     * The request was successfully processed.
     */
    ERROR_NONE = 0,
    SATELLITE_RESULT_SUCCESS = 0,
    /**
     * A generic error which should be used only when other specific errors cannot be used.
     */
    SATELLITE_ERROR = 1,
    SATELLITE_RESULT_ERROR = 1,
    /**
     * Error received from the satellite server.
     */
    SERVER_ERROR = 2,
    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.
     */
    SERVICE_ERROR = 3,
    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.
     */
    MODEM_ERROR = 4,
    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.
     */
    NETWORK_ERROR = 5,
    /**
     * Telephony is not in a valid state to receive requests from clients.
     */
    INVALID_TELEPHONY_STATE = 6,
    SATELLITE_RESULT_NETWORK_ERROR = 5,
    /**
     * Satellite modem is not in a valid state to receive requests from clients.
     */
    INVALID_MODEM_STATE = 7,
    SATELLITE_RESULT_INVALID_MODEM_STATE = 6,
    /**
     * Either vendor service, or modem, or Telephony framework has received a request with
     * invalid arguments from its clients.
     */
    INVALID_ARGUMENTS = 8,
    SATELLITE_RESULT_INVALID_ARGUMENTS = 7,
    /**
     * Telephony framework failed to send a request or receive a response from the vendor service
     * or satellite modem due to internal error.
     */
    REQUEST_FAILED = 9,
    SATELLITE_RESULT_REQUEST_FAILED = 8,
    /**
     * Radio did not start or is resetting.
     */
    RADIO_NOT_AVAILABLE = 10,
    SATELLITE_RESULT_RADIO_NOT_AVAILABLE = 9,
    /**
     * The request is not supported by either the satellite modem or the network.
     */
    REQUEST_NOT_SUPPORTED = 11,
    SATELLITE_RESULT_REQUEST_NOT_SUPPORTED = 10,
    /**
     * Satellite modem or network has no resources available to handle requests from clients.
     */
    NO_RESOURCES = 12,
    SATELLITE_RESULT_NO_RESOURCES = 11,
    /**
     * Satellite service is not provisioned yet.
     */
    SERVICE_NOT_PROVISIONED = 13,
    SATELLITE_RESULT_SERVICE_NOT_PROVISIONED = 12,
    /**
     * Satellite service provision is already in progress.
     */
    SERVICE_PROVISION_IN_PROGRESS = 14,
    SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS = 13,
    /**
     * The ongoing request was aborted by either the satellite modem or the network.
     */
    REQUEST_ABORTED = 15,
    SATELLITE_RESULT_REQUEST_ABORTED = 14,
    /**
     * The device/subscriber is barred from accessing the satellite service.
     */
    SATELLITE_ACCESS_BARRED = 16,
    SATELLITE_RESULT_ACCESS_BARRED = 15,
    /**
     * Satellite modem timeout to receive ACK or response from the satellite network after
     * sending a request to the network.
     */
    NETWORK_TIMEOUT = 17,
    SATELLITE_RESULT_NETWORK_TIMEOUT = 16,
    /**
     * Satellite network is not reachable from the modem.
     */
    SATELLITE_NOT_REACHABLE = 18,
    SATELLITE_RESULT_NOT_REACHABLE = 17,
    /**
     * The device/subscriber is not authorized to register with the satellite service provider.
     */
    NOT_AUTHORIZED = 19
    SATELLITE_RESULT_NOT_AUTHORIZED = 18
}