diff options
author | Rahul Sabnis <rahulsabnis@google.com> | 2022-03-15 17:59:32 -0700 |
---|---|---|
committer | Rahul Sabnis <rahulsabnis@google.com> | 2022-03-15 18:00:26 -0700 |
commit | ea54b75c83f3fc8acefc630d60d29c588470f8a5 (patch) | |
tree | 1f0cfbacd7fab476ada285fc231ea8c682285542 /framework/java/android/bluetooth/BluetoothDevice.java | |
parent | 6c5e19d9d6d237cfac94e5ce3df4e4d19c52901c (diff) |
Updating docs for BluetoothDevice#disconnect as-per API council feedback
Tag: #feature
Bug: 202102309
Test: Manual
Ignore-AOSP-First: Original change is only in internal branches
Change-Id: I9afe1e4701690bed0f27fba912abd5e696030878
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothDevice.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java index 90aa3000e6..3faa6f4214 100644 --- a/framework/java/android/bluetooth/BluetoothDevice.java +++ b/framework/java/android/bluetooth/BluetoothDevice.java @@ -2002,10 +2002,14 @@ public final class BluetoothDevice implements Parcelable, Attributable { /** * Disconnects all connected bluetooth profiles between the local and remote device. - * Disconnection is asynchronous and you should listen to each profile's broadcast intent + * Disconnection is asynchronous, so you should listen to each profile's broadcast intent * ACTION_CONNECTION_STATE_CHANGED to verify whether disconnection was successful. For example, * to verify a2dp is disconnected, you would listen for - * {@link BluetoothA2dp#ACTION_CONNECTION_STATE_CHANGED} + * {@link BluetoothA2dp#ACTION_CONNECTION_STATE_CHANGED}. Once all profiles have disconnected, + * the ACL link should come down and {@link #ACTION_ACL_DISCONNECTED} should be broadcast. + * <p> + * In the rare event that one or more profiles fail to disconnect, call this method again to + * send another request to disconnect each connected profile. * * @return whether the messages were successfully sent to try to disconnect all profiles * @throws IllegalArgumentException if the device address is invalid |