summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothStatusCodes.java
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2022-02-03 07:30:59 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-03 07:30:59 +0000
commit602cb15f1577a9d932c514ff6d472ec15dc3f1ad (patch)
tree4a1ebd19d55f85b3292cbb1846f2f259d5bbf6b5 /framework/java/android/bluetooth/BluetoothStatusCodes.java
parentc12ba609a8d7dc05ef4aa0b80c813bd5d86caf23 (diff)
parent0dc9bbcf7f437a28edc26a5fa368c4e4021f6a62 (diff)
Introduce LE audio broadcast system APIs am: a014314c94 am: de7f1f372c am: 0dc9bbcf7f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1959800 Change-Id: I1bba0232e4c5e3bbcbd5a2305068909d06f3488b
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothStatusCodes.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothStatusCodes.java155
1 files changed, 119 insertions, 36 deletions
diff --git a/framework/java/android/bluetooth/BluetoothStatusCodes.java b/framework/java/android/bluetooth/BluetoothStatusCodes.java
index 0425220c8d..5f90d7ed48 100644
--- a/framework/java/android/bluetooth/BluetoothStatusCodes.java
+++ b/framework/java/android/bluetooth/BluetoothStatusCodes.java
@@ -104,6 +104,94 @@ 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;
+
+ /**
* A GATT writeCharacteristic request is not permitted on the remote device.
*/
public static final int ERROR_GATT_WRITE_NOT_ALLOWED = 101;
@@ -249,65 +337,60 @@ public final class BluetoothStatusCodes {
*/
public static final int ERROR_DISCONNECT_REASON_BAD_PARAMETERS = 1109;
+ // LE audio related return codes reserved from 1200 to 1300
+
/**
- * 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 the broadcast ID cannot be found among existing Broadcast Sources.
* @hide
*/
- public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_SET_BROADCAST_MODE_FAILED = 1110;
+ @SystemApi
+ public static final int ERROR_LE_BROADCAST_INVALID_BROADCAST_ID = 1200;
/**
- * 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 encryption code entered does not meet the specification requirement
* @hide
*/
- public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_SET_ENCRYPTION_KEY_FAILED = 1111;
+ @SystemApi
+ public static final int ERROR_LE_BROADCAST_INVALID_CODE = 1201;
/**
- * 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 the source ID cannot be found in the given Broadcast sink device
* @hide
*/
- public static final int ERROR_LE_AUDIO_BROADCAST_AUDIO_SCAN_SERVICE_CONNECT_FAILED = 1112;
+ @SystemApi
+ public static final int ERROR_LE_BROADCAST_ASSISTANT_INVALID_SOURCE_ID = 1202;
/**
- * 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 the same Broadcast Source is already added to the Broadcast Sink
*
+ * Broadcast Source is identified by their advertising SID and broadcast ID
* @hide
*/
- public static final int ERROR_LE_AUDIO_BROADCAST_AUDIO_SCAN_SERVICE_DISCONNECT_FAILED = 1113;
+ @SystemApi
+ public static final int ERROR_LE_BROADCAST_ASSISTANT_DUPLICATE_ADDITION = 1203;
+
/**
- * Indicates that enabling LE Audio Broadcast encryption 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 the program info in a {@link BluetoothLeAudioContentMetadata} is not valid
* @hide
*/
- public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_ENABLE_ENCRYPTION_FAILED = 1114;
+ @SystemApi
+ public static final int ERROR_LE_CONTENT_METADATA_INVALID_PROGRAM_INFO = 1204;
/**
- * Indicates that disabling LE Audio Broadcast encryption 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 the language code in a {@link BluetoothLeAudioContentMetadata} is not valid
* @hide
*/
- public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_DISABLE_ENCRYPTION_FAILED = 1115;
+ @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 the RFCOMM listener could not be started due to the requested UUID already
@@ -361,7 +444,7 @@ public final class BluetoothStatusCodes {
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;
}