summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHealthCallback.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-07 20:10:36 -0800
commit07ffaa447fdd967689901cca38eba386a8d97b23 (patch)
tree23e4d3fce226cad5cb79248ea5dd8f5a17d4cec9 /framework/java/android/bluetooth/BluetoothHealthCallback.java
parente4f8ddcb0f26d05f07f4c25dfcf1d324a9232cfe (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
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHealthCallback.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothHealthCallback.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHealthCallback.java b/framework/java/android/bluetooth/BluetoothHealthCallback.java
index 40234856b8..4769212c53 100644
--- a/framework/java/android/bluetooth/BluetoothHealthCallback.java
+++ b/framework/java/android/bluetooth/BluetoothHealthCallback.java
@@ -23,7 +23,13 @@ import android.util.Log;
/**
* This abstract class is used to implement {@link BluetoothHealth} callbacks.
+ *
+ * @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()(int)}, or
+ * {@link BluetoothDevice#createL2capChannel(int)}
*/
+@Deprecated
public abstract class BluetoothHealthCallback {
private static final String TAG = "BluetoothHealthCallback";
@@ -38,8 +44,14 @@ public abstract class BluetoothHealthCallback {
* BluetoothHealth#APP_CONFIG_REGISTRATION_FAILURE} or
* {@link BluetoothHealth#APP_CONFIG_UNREGISTRATION_SUCCESS}
* or {@link BluetoothHealth#APP_CONFIG_UNREGISTRATION_FAILURE}
+ *
+ * @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()(int)}, or
+ * {@link BluetoothDevice#createL2capChannel(int)}
*/
@BinderThread
+ @Deprecated
public void onHealthAppConfigurationStatusChange(BluetoothHealthAppConfiguration config,
int status) {
Log.d(TAG, "onHealthAppConfigurationStatusChange: " + config + "Status: " + status);
@@ -58,8 +70,14 @@ public abstract class BluetoothHealthCallback {
* @param fd The Parcel File Descriptor when the channel state is connected.
* @param channelId The id associated with the channel. This id will be used in future calls
* like when disconnecting the channel.
+ *
+ * @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()(int)}, or
+ * {@link BluetoothDevice#createL2capChannel(int)}
*/
@BinderThread
+ @Deprecated
public void onHealthChannelStateChange(BluetoothHealthAppConfiguration config,
BluetoothDevice device, int prevState, int newState, ParcelFileDescriptor fd,
int channelId) {