summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothProfile.java
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2019-01-03 16:23:41 -0800
committerJack He <siyuanh@google.com>2019-01-09 18:09:21 -0800
commit8bb9c7d4acc24f45fad0b1b964f4973e71fab3e3 (patch)
treef665dceefff5bc700621623c24f24cbea15ab282 /framework/java/android/bluetooth/BluetoothProfile.java
parent84995ea1de36b4b6e14a103f2932c76da315d2bf (diff)
Deprecate BluetoothHealth APIs
* Mark all BluetoothHealth related APIs as deprecated * Make BluetoothAdapter#getProfileProxy(context, BluetoothProfile.HEALTH) always return false * Remove all logic behind BluetoothHealth APIs and add deprecation error log * Health Device Profile (HDP) and MCAP protocol has been largely replaced by BLE. New applications should use Bluetooth Low Energy instead of legacy Bluetooth Health Device Profile Bug: 111562841 Test: make, unit test, use Bluetooth Change-Id: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892 Merged-In: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892 (cherry picked from commit 07ffaa447fdd967689901cca38eba386a8d97b23)
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothProfile.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothProfile.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/framework/java/android/bluetooth/BluetoothProfile.java b/framework/java/android/bluetooth/BluetoothProfile.java
index 3c3a01b191..3c87c739e1 100644
--- a/framework/java/android/bluetooth/BluetoothProfile.java
+++ b/framework/java/android/bluetooth/BluetoothProfile.java
@@ -72,7 +72,13 @@ public interface BluetoothProfile {
/**
* Health Profile
+ *
+ * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New
+ * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt},
+ * {@link BluetoothAdapter#listenUsingL2capChannel()}, or
+ * {@link BluetoothDevice#createL2capChannel(int)}
*/
+ @Deprecated
int HEALTH = 3;
/**
@@ -269,9 +275,8 @@ public interface BluetoothProfile {
* Called to notify the client when the proxy object has been
* connected to the service.
*
- * @param profile - One of {@link #HEALTH}, {@link #HEADSET} or {@link #A2DP}
- * @param proxy - One of {@link BluetoothHealth}, {@link BluetoothHeadset} or {@link
- * BluetoothA2dp}
+ * @param profile - One of {@link #HEADSET} or {@link #A2DP}
+ * @param proxy - One of {@link BluetoothHeadset} or {@link BluetoothA2dp}
*/
public void onServiceConnected(int profile, BluetoothProfile proxy);
@@ -279,7 +284,7 @@ public interface BluetoothProfile {
* Called to notify the client that this proxy object has been
* disconnected from the service.
*
- * @param profile - One of {@link #HEALTH}, {@link #HEADSET} or {@link #A2DP}
+ * @param profile - One of {@link #HEADSET} or {@link #A2DP}
*/
public void onServiceDisconnected(int profile);
}