diff options
author | Deyao Ren <deyaoren@google.com> | 2022-03-07 19:26:56 +0000 |
---|---|---|
committer | Deyao Ren <deyaoren@google.com> | 2022-03-07 19:39:27 +0000 |
commit | a26bda4d37221f2f7ef750b413502091e3bcddd4 (patch) | |
tree | 3b525e14dd767931b5f004e6b694a83ced2dc28d /framework/java/android/bluetooth/BluetoothStatusCodes.java | |
parent | 813ac5fee4ed39e947e041c9a161f60f9ace49b0 (diff) | |
parent | 260f34b984915be6f8bea511be1f0bbd22c933d9 (diff) |
Merge TP1A.220209.001
Change-Id: Id0e2895d3220831d2c617a243047e8229af8acc9
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothStatusCodes.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothStatusCodes.java | 275 |
1 files changed, 238 insertions, 37 deletions
diff --git a/framework/java/android/bluetooth/BluetoothStatusCodes.java b/framework/java/android/bluetooth/BluetoothStatusCodes.java index a8ce4b4118..8825c3e71b 100644 --- a/framework/java/android/bluetooth/BluetoothStatusCodes.java +++ b/framework/java/android/bluetooth/BluetoothStatusCodes.java @@ -133,6 +133,103 @@ public final class BluetoothStatusCodes { public static final int ERROR_TIMEOUT = 15; /** + * Indicates that some local application caused the event. + * @hide + */ + @SystemApi + public static final int REASON_LOCAL_APP_REQUEST = 16; + + /** + * Indicate that this change was initiated by the Bluetooth implementation on this device + * @hide + */ + @SystemApi + public static final int REASON_LOCAL_STACK_REQUEST = 17; + + /** + * Indicate that this change was initiated by the remote device. + * @hide + */ + @SystemApi + public static final int REASON_REMOTE_REQUEST = 18; + + /** + * Indicates that the local system policy caused the change, such as privacy policy, power + * management policy, permission changes, and more. + * @hide + */ + @SystemApi + public static final int REASON_SYSTEM_POLICY = 19; + + /** + * Indicates that an underlying hardware incurred some error maybe try again later or toggle + * the hardware state. + * @hide + */ + @SystemApi + public static final int ERROR_HARDWARE_GENERIC = 20; + + /** + * Indicates that the operation failed due to bad API input parameter that is not covered + * by other more detailed error code + * @hide + */ + @SystemApi + public static final int ERROR_BAD_PARAMETERS = 21; + + /** + * Indicate that there is not enough local resource to perform the requested operation + * @hide + */ + @SystemApi + public static final int ERROR_LOCAL_NOT_ENOUGH_RESOURCES = 22; + + /** + * Indicate that a remote device does not have enough resource to perform the requested + * operation + * @hide + */ + @SystemApi + public static final int ERROR_REMOTE_NOT_ENOUGH_RESOURCES = 23; + + /** + * Indicates that the remote rejected this operation for reasons not covered above + * @hide + */ + @SystemApi + public static final int ERROR_REMOTE_OPERATION_REJECTED = 24; + + /** + * Indicates that there is an underlying link error between the local and remote devices. + * + * Maybe try again later or disconnect and retry. + * @hide + */ + @SystemApi + public static final int ERROR_REMOTE_LINK_ERROR = 25; + + /** + * A generic error code to indicate that the system is already in a target state that an API + * tries to request. + * + * For example, this error code will be delivered if someone tries to stop scanning when + * scan has already stopped, or start scanning when scan has already started. + * + * @hide + */ + @SystemApi + public static final int ERROR_ALREADY_IN_TARGET_STATE = 26; + + /** + * Indicates that the requested operation is not supported by the remote device + * + * Caller should stop trying this operation + * @hide + */ + @SystemApi + public static final int ERROR_REMOTE_OPERATION_NOT_SUPPORTED = 24; + + /** * A GATT writeCharacteristic request is not permitted on the remote device. */ public static final int ERROR_GATT_WRITE_NOT_ALLOWED = 200; @@ -143,6 +240,22 @@ public final class BluetoothStatusCodes { public static final int ERROR_GATT_WRITE_REQUEST_BUSY = 201; /** + * Indicates that the operation is allowed. + * + * @hide + */ + @SystemApi + public static final int ALLOWED = 400; + + /** + * Indicates that the operation is not allowed. + * + * @hide + */ + @SystemApi + public static final int NOT_ALLOWED = 401; + + /** * If another application has already requested {@link OobData} then another fetch will be * disallowed until the callback is removed. * @@ -263,99 +376,187 @@ public final class BluetoothStatusCodes { public static final int ERROR_DISCONNECT_REASON_BAD_PARAMETERS = 1109; /** - * Indicates that setting the LE Audio Broadcast mode failed. - * <p> - * Example solution: Change parameters and try again. If error persists, the app can report - * telemetry and/or log the error in a bugreport. + * Indicates that there is already one device for which SCO audio is connected or connecting. * * @hide */ - public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_SET_BROADCAST_MODE_FAILED = 1110; + @SystemApi + public static final int ERROR_AUDIO_DEVICE_ALREADY_CONNECTED = 1116; /** - * Indicates that setting a new encryption key for Bluetooth LE Audio Broadcast Source failed. - * <p> - * Example solution: Change parameters and try again. If error persists, the app can report - * telemetry and/or log the error in a bugreport. + * Indicates that SCO audio was already not connected for this device. * * @hide */ - public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_SET_ENCRYPTION_KEY_FAILED = 1111; + @SystemApi + public static final int ERROR_AUDIO_DEVICE_ALREADY_DISCONNECTED = 1117; /** - * Indicates that connecting to a remote Broadcast Audio Scan Service failed. - * <p> - * Example solution: Change parameters and try again. If error persists, the app can report - * telemetry and/or log the error in a bugreport. + * Indicates that there audio route is currently blocked by the system. * * @hide */ - public static final int ERROR_LE_AUDIO_BROADCAST_AUDIO_SCAN_SERVICE_CONNECT_FAILED = 1112; + @SystemApi + public static final int ERROR_AUDIO_ROUTE_BLOCKED = 1118; /** - * Indicates that disconnecting from a remote Broadcast Audio Scan Service failed. - * <p> - * Example solution: Change parameters and try again. If error persists, the app can report - * telemetry and/or log the error in a bugreport. + * Indicates that there is an active call preventing this operation from succeeding. + * + * @hide + */ + @SystemApi + public static final int ERROR_CALL_ACTIVE = 1119; + + // LE audio related return codes reserved from 1200 to 1300 + + /** + * Indicates that the broadcast ID cannot be found among existing Broadcast Sources. + * @hide + */ + @SystemApi + public static final int ERROR_LE_BROADCAST_INVALID_BROADCAST_ID = 1200; + + /** + * Indicates that encryption code entered does not meet the specification requirement + * @hide + */ + @SystemApi + public static final int ERROR_LE_BROADCAST_INVALID_CODE = 1201; + + /** + * Indicates that the source ID cannot be found in the given Broadcast sink device + * @hide + */ + @SystemApi + public static final int ERROR_LE_BROADCAST_ASSISTANT_INVALID_SOURCE_ID = 1202; + + /** + * Indicates that the same Broadcast Source is already added to the Broadcast Sink + * + * Broadcast Source is identified by their advertising SID and broadcast ID + * @hide + */ + @SystemApi + public static final int ERROR_LE_BROADCAST_ASSISTANT_DUPLICATE_ADDITION = 1203; + + + /** + * Indicates that the program info in a {@link BluetoothLeAudioContentMetadata} is not valid + * @hide + */ + @SystemApi + public static final int ERROR_LE_CONTENT_METADATA_INVALID_PROGRAM_INFO = 1204; + + /** + * Indicates that the language code in a {@link BluetoothLeAudioContentMetadata} is not valid + * @hide + */ + @SystemApi + public static final int ERROR_LE_CONTENT_METADATA_INVALID_LANGUAGE = 1205; + + /** + * Indicates that operation failed due to other {@link BluetoothLeAudioContentMetadata} related + * issues not covered by other reason codes. + * @hide + */ + @SystemApi + public static final int ERROR_LE_CONTENT_METADATA_INVALID_OTHER = 1206; + + /** + * Indicates that provided group ID is invalid for the coordinated set + * @hide + */ + @SystemApi + public static final int ERROR_CSIP_INVALID_GROUP_ID = 1207; + + /** + * Indicating that CSIP group locked failed due to group member being already locked. * * @hide */ - public static final int ERROR_LE_AUDIO_BROADCAST_AUDIO_SCAN_SERVICE_DISCONNECT_FAILED = 1113; + @SystemApi + public static final int ERROR_CSIP_GROUP_LOCKED_BY_OTHER = 1208; /** - * Indicates that enabling LE Audio Broadcast encryption failed + * Indicating that CSIP device has been lost while being locked. + * @hide + */ + @SystemApi + public static final int ERROR_CSIP_LOCKED_GROUP_MEMBER_LOST = 1209; + + /** + * Indicates that the set preset name is too long. * <p> - * Example solution: Change parameters and try again. If error persists, the app can report - * telemetry and/or log the error in a bugreport. + * Example solution: Try using shorter name. * * @hide */ - public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_ENABLE_ENCRYPTION_FAILED = 1114; + @SystemApi + public static final int ERROR_HAP_PRESET_NAME_TOO_LONG = 1210; /** - * Indicates that disabling LE Audio Broadcast encryption failed + * Indicates that provided preset index parameters is invalid * <p> - * Example solution: Change parameters and try again. If error persists, the app can report - * telemetry and/or log the error in a bugreport. + * Example solution: Use preset index of a known existing preset. * * @hide */ - public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_DISABLE_ENCRYPTION_FAILED = 1115; + @SystemApi + public static final int ERROR_HAP_INVALID_PRESET_INDEX = 1211; /** - * Indicates that there is already one device for which SCO audio is connected or connecting. + * Indicates that the RFCOMM listener could not be started due to the requested UUID already + * being in use. * * @hide */ @SystemApi - public static final int ERROR_AUDIO_DEVICE_ALREADY_CONNECTED = 1116; + public static final int RFCOMM_LISTENER_START_FAILED_UUID_IN_USE = 2000; /** - * Indicates that SCO audio was already not connected for this device. + * Indicates that the operation could not be competed because the service record on which the + * operation was requested on does not exist. * * @hide */ @SystemApi - public static final int ERROR_AUDIO_DEVICE_ALREADY_DISCONNECTED = 1117; + public static final int RFCOMM_LISTENER_OPERATION_FAILED_NO_MATCHING_SERVICE_RECORD = 2001; /** - * Indicates that there audio route is currently blocked by the system. + * Indicates that the operation could not be completed because the application requesting the + * operation on the RFCOMM listener was not the one which registered it. * * @hide */ @SystemApi - public static final int ERROR_AUDIO_ROUTE_BLOCKED = 1118; + public static final int RFCOMM_LISTENER_OPERATION_FAILED_DIFFERENT_APP = 2002; /** - * Indicates that there is an active call preventing this operation from succeeding. + * Indicates that the creation of the underlying BluetoothServerSocket failed. * * @hide */ @SystemApi - public static final int ERROR_CALL_ACTIVE = 1119; + public static final int RFCOMM_LISTENER_FAILED_TO_CREATE_SERVER_SOCKET = 2003; + + /** + * Indicates that closing the underlying BluetoothServerSocket failed. + * + * @hide + */ + @SystemApi + public static final int RFCOMM_LISTENER_FAILED_TO_CLOSE_SERVER_SOCKET = 2004; + + /** + * Indicates that there is no socket available to retrieve from the given listener. + * + * @hide + */ + @SystemApi + public static final int RFCOMM_LISTENER_NO_SOCKET_AVAILABLE = 2005; /** - * Indicates that an unknown error has occurred has occurred. + * Indicates that an unknown error has occurred. */ public static final int ERROR_UNKNOWN = Integer.MAX_VALUE; } |