From 723fe23ce87d942fadeb02887bf932d9e8f4ed4b Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Mon, 1 Mar 2021 13:02:25 +0000 Subject: [PATCH] Bluetooth: Add Media Control Profile Tag: #feature Bug: 150670922 Sponsor: jpawlowski@ Test: compilation Change-Id: Icabed06e6b1973ecee9cd1d6eeec80c6d2a9d72e --- core/api/system-current.txt | 2 ++ core/java/android/bluetooth/BluetoothProfile.java | 9 ++++++++- core/java/android/bluetooth/BluetoothUuid.java | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 675347085f095..8ed356c555d47 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -1644,6 +1644,7 @@ package android.bluetooth { field @NonNull public static final android.os.ParcelUuid BASE_UUID; field @NonNull public static final android.os.ParcelUuid BNEP; field @NonNull public static final android.os.ParcelUuid DIP; + field @NonNull public static final android.os.ParcelUuid GENERIC_MEDIA_CONTROL; field @NonNull public static final android.os.ParcelUuid HEARING_AID; field @NonNull public static final android.os.ParcelUuid HFP; field @NonNull public static final android.os.ParcelUuid HFP_AG; @@ -1654,6 +1655,7 @@ package android.bluetooth { field @NonNull public static final android.os.ParcelUuid LE_AUDIO; field @NonNull public static final android.os.ParcelUuid MAP; field @NonNull public static final android.os.ParcelUuid MAS; + field @NonNull public static final android.os.ParcelUuid MEDIA_CONTROL; field @NonNull public static final android.os.ParcelUuid MNS; field @NonNull public static final android.os.ParcelUuid NAP; field @NonNull public static final android.os.ParcelUuid OBEX_OBJECT_PUSH; diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java index b76d6b8691311..bea32abd06cdc 100644 --- a/core/java/android/bluetooth/BluetoothProfile.java +++ b/core/java/android/bluetooth/BluetoothProfile.java @@ -221,13 +221,20 @@ public interface BluetoothProfile { @SystemApi int VOLUME_CONTROL = 23; + /** + * @hide + * Media Control Profile server + * + */ + int MCP_SERVER = 24; + /** * Max profile ID. This value should be updated whenever a new profile is added to match * the largest value assigned to a profile. * * @hide */ - int MAX_PROFILE_ID = 23; + int MAX_PROFILE_ID = 24; /** * Default priority for devices that we try to auto-connect to and diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java index d82cf19e88223..d07259393b510 100644 --- a/core/java/android/bluetooth/BluetoothUuid.java +++ b/core/java/android/bluetooth/BluetoothUuid.java @@ -172,6 +172,16 @@ public final class BluetoothUuid { /** @hide */ @NonNull @SystemApi + public static final ParcelUuid GENERIC_MEDIA_CONTROL = + ParcelUuid.fromString("00001849-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi + public static final ParcelUuid MEDIA_CONTROL = + ParcelUuid.fromString("00001848-0000-1000-8000-00805F9B34FB"); + /** @hide */ + @NonNull + @SystemApi public static final ParcelUuid BASE_UUID = ParcelUuid.fromString("00000000-0000-1000-8000-00805F9B34FB");