Merge "Update javadoc to reflect that BluetoothPbap#setConnectionPolicy returns true on successfully setting the connection policy instead of on disconnection. It also now indicates that if BluetoothProfile#CONNECTION_POLICY_FORBIDDEN is passed in, the profile will be disconnected." am: a09e9e4fe1 am: 4b67009cb2 am: 25ca788a9c am: c6e17ef4fe am: 49b05c85be

Change-Id: I7dc2c1157e265f32a537ea8f0aa26acb0777be12
This commit is contained in:
Automerger Merge Worker
2020-02-25 10:50:00 +00:00

View File

@@ -278,16 +278,19 @@ public class BluetoothPbap implements BluetoothProfile {
}
/**
* Pbap does not store connection policy, so this function only disconnects pbap if
* connectionPolicy is {@link #CONNECTION_POLICY_FORBIDDEN}.
* Set connection policy of the profile and tries to disconnect it if connectionPolicy is
* {@link BluetoothProfile#CONNECTION_POLICY_FORBIDDEN}
*
* <p> The device should already be paired.
* Connection policy can be one of {@link #CONNECTION_POLICY_ALLOWED},
* {@link #CONNECTION_POLICY_FORBIDDEN}, {@link #CONNECTION_POLICY_UNKNOWN}
* Connection policy can be one of:
* {@link BluetoothProfile#CONNECTION_POLICY_ALLOWED},
* {@link BluetoothProfile#CONNECTION_POLICY_FORBIDDEN},
* {@link BluetoothProfile#CONNECTION_POLICY_UNKNOWN}
*
* @param device Paired bluetooth device
* @param connectionPolicy determines whether to disconnect the device
* @return true if pbap is successfully disconnected, false otherwise
* @param connectionPolicy is the connection policy to set to for this profile
* @return true if connectionPolicy is set, false on error
*
* @hide
*/
@SystemApi