From a89f2e1a02f986de04078ee399f39ad09d0c53f8 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Thu, 27 Jan 2022 13:23:05 +0000 Subject: LE Audio: Expose more system APIs * Expose two intentss: * ACTION_LE_AUDIO_ACTIVE_DEVICE_CHANGED * ACTION_LE_AUDIO_GROUP_NODE_STATUS_CHANGED * Settings and Telecom are interested in the group node status information, therefore lets expose the API as a SystemApi * Reduce scope of HAP connection state API to system API * Expose more system APIs for HAP client * To select different hearing presets * To get notified about changes in hearing presets * To get all available hearing presets * Expose more system APIs for CSIP * To make error codes more visible for the API caller * Expose GROUP_ID_INVALID to public API for getGroupId() Bug: 150670922 Test: atest BluetoothInstrumentationTests Tag: #feature Sponsor: siyuanh@ Ignore-AOSP-First: earlier change merged on internal Change-Id: If87e0863f23b989632603ac1253e4a77bfff028d --- .../android/bluetooth/BluetoothStatusCodes.java | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'framework/java/android/bluetooth/BluetoothStatusCodes.java') diff --git a/framework/java/android/bluetooth/BluetoothStatusCodes.java b/framework/java/android/bluetooth/BluetoothStatusCodes.java index 01e30dbfff..8825c3e71b 100644 --- a/framework/java/android/bluetooth/BluetoothStatusCodes.java +++ b/framework/java/android/bluetooth/BluetoothStatusCodes.java @@ -220,6 +220,15 @@ public final class BluetoothStatusCodes { @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. */ @@ -453,6 +462,48 @@ public final class BluetoothStatusCodes { @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 + */ + @SystemApi + public static final int ERROR_CSIP_GROUP_LOCKED_BY_OTHER = 1208; + + /** + * 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. + *

+ * Example solution: Try using shorter name. + * + * @hide + */ + @SystemApi + public static final int ERROR_HAP_PRESET_NAME_TOO_LONG = 1210; + + /** + * Indicates that provided preset index parameters is invalid + *

+ * Example solution: Use preset index of a known existing preset. + * + * @hide + */ + @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 * being in use. -- cgit v1.2.3