aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothProfile.java
diff options
context:
space:
mode:
authorBryce Lee <brycelee@google.com>2016-10-09 12:54:42 -0700
committerSanket Agarwal <sanketa@google.com>2016-11-01 15:13:04 -0700
commitff5093b73ec3daf31209d1d031e0e160e012274d (patch)
treee1606fb8d5cfded4ce583c64992841ba9addcd49 /framework/java/android/bluetooth/BluetoothProfile.java
parent257f8fe85e626e8741ae626228214c2c34390aea (diff)
Add a way to query for supported Bluetooth profiles.
Currently there is no way to get the profiles supported by the Bluetooth adapter. Asking for a profile proxy of an unsupported profile does not fail and can lead to code indefinitely waiting for the proxy response. This new code will allow for checking the supported profiles before asking for the proxies. Bug: 26451648 Change-Id: I4b48e7151f5ca53851aa3b967c143fae140ecd34 (cherry picked from commit b1301fa2849bafd6daa422281dc5200863bc761e)
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothProfile.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothProfile.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothProfile.java b/framework/java/android/bluetooth/BluetoothProfile.java
index eee66d193f..20d95ccc38 100644
--- a/framework/java/android/bluetooth/BluetoothProfile.java
+++ b/framework/java/android/bluetooth/BluetoothProfile.java
@@ -137,6 +137,13 @@ public interface BluetoothProfile {
public static final int PBAP_CLIENT = 17;
/**
+ * Max profile ID. This value should be updated whenever a new profile is added to match
+ * the largest value assigned to a profile.
+ * @hide
+ */
+ public static final int MAX_PROFILE_ID = 17;
+
+ /**
* Default priority for devices that we try to auto-connect to and
* and allow incoming connections for the profile
* @hide