diff options
| author | Grzegorz Kołodziejczyk <gkolodziejczyk@google.com> | 2022-12-20 16:35:19 +0000 |
|---|---|---|
| committer | David Duarte <licorne@google.com> | 2023-01-27 23:25:15 +0000 |
| commit | dcc4ecd5d3c26d6a157eaf80f8c0b852d0b6500d (patch) | |
| tree | c66cd24a8bc353a6354cf02ca41815df361b9062 /framework/java/android/bluetooth/BluetoothDevice.java | |
| parent | a8e29ffb8050cc4d652aad113a0e353c19c66597 (diff) | |
Extend Metadata Database with GMCS, GTBS CCC data
This patch allows to store CCCD values for GMCS and GTBS
characteristics. After re-connection stored values will be set to latest
state (possible only enable notification).
Tag: #feature
Bug: 229037130
Test: atest com.android.bluetooth.btservice.storage.DatabaseManagerTest#testDatabaseMigration_116_117
Change-Id: I55ddf87f2680246f1a60dfa67bd005ccc20d20af
Merged-In: I55ddf87f2680246f1a60dfa67bd005ccc20d20af
(cherry picked from commit e13984ab9da3b3391a3af5860df3b01eabdf53bc)
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
| -rw-r--r-- | framework/java/android/bluetooth/BluetoothDevice.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java index 780a66014b..5646efb50b 100644 --- a/framework/java/android/bluetooth/BluetoothDevice.java +++ b/framework/java/android/bluetooth/BluetoothDevice.java @@ -510,7 +510,9 @@ public final class BluetoothDevice implements Parcelable, Attributable { METADATA_UNTETHERED_CASE_LOW_BATTERY_THRESHOLD, METADATA_SPATIAL_AUDIO, METADATA_FAST_PAIR_CUSTOMIZED_FIELDS, - METADATA_LE_AUDIO}) + METADATA_LE_AUDIO, + METADATA_GMCS_CCCD, + METADATA_GTBS_CCCD}) @Retention(RetentionPolicy.SOURCE) public @interface MetadataKey{} @@ -757,6 +759,21 @@ public final class BluetoothDevice implements Parcelable, Attributable { */ public static final int METADATA_LE_AUDIO = 26; + /** + * The UUIDs (16-bit) of registered to CCC characteristics from Media Control services. + * Data type should be {@link Byte} array. + * @hide + */ + public static final int METADATA_GMCS_CCCD = 27; + + /** + * The UUIDs (16-bit) of registered to CCC characteristics from Telephony Bearer service. + * Data type should be {@link Byte} array. + * @hide + */ + public static final int METADATA_GTBS_CCCD = 28; + + private static final int METADATA_MAX_KEY = METADATA_GTBS_CCCD; /** * Device type which is used in METADATA_DEVICE_TYPE @@ -3225,7 +3242,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * @hide */ public static @MetadataKey int getMaxMetadataKey() { - return METADATA_LE_AUDIO; + return METADATA_MAX_KEY; } /** @hide */ |
