diff options
| author | Jack He <siyuanh@google.com> | 2022-02-03 06:17:03 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-02-03 06:17:03 +0000 |
| commit | 0b3fcdf1a5b7d965c324229421457b4149e7abc8 (patch) | |
| tree | 152f5045a8091ac6983fbc8b83aa3f393bf62530 /framework/java/android/bluetooth/BluetoothStatusCodes.java | |
| parent | fe6f2d0126f17ba4abb098ee16c1f743e6b048ab (diff) | |
| parent | 421c8fbdde31f1146bd6f2d93589e2c10b314bb5 (diff) | |
Merge changes from topic "bt-api-update"
* changes:
LE Audio: Expose more system APIs
hap: Add initial implementation
Introduce LE audio broadcast system APIs
leaudio: Improve Volume Control API
LE Scanner: Add AD TYPE filter APIs
Add API to set the codec preference for specific device
Add API to get identity address
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothStatusCodes.java')
| -rw-r--r-- | framework/java/android/bluetooth/BluetoothStatusCodes.java | 196 |
1 files changed, 165 insertions, 31 deletions
diff --git a/framework/java/android/bluetooth/BluetoothStatusCodes.java b/framework/java/android/bluetooth/BluetoothStatusCodes.java index 0425220c8d..fe7f57973c 100644 --- a/framework/java/android/bluetooth/BluetoothStatusCodes.java +++ b/framework/java/android/bluetooth/BluetoothStatusCodes.java @@ -104,6 +104,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 = 101; @@ -249,65 +346,102 @@ 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 + */ + @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 */ - public static final int ERROR_LE_AUDIO_BROADCAST_SOURCE_SET_ENCRYPTION_KEY_FAILED = 1111; + @SystemApi + public static final int ERROR_LE_BROADCAST_ASSISTANT_INVALID_SOURCE_ID = 1202; /** - * 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 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_CONNECT_FAILED = 1112; + @SystemApi + public static final int ERROR_LE_BROADCAST_ASSISTANT_DUPLICATE_ADDITION = 1203; + /** - * 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 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 the RFCOMM listener could not be started due to the requested UUID already @@ -361,7 +495,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; } |
