setProfileConnectionPolicy

abstract suspend fun setProfileConnectionPolicy(    deviceAddress: BluetoothDeviceAddress,     profile: BluetoothDeviceProfile,     isAllowed: Boolean): Boolean

Sets the platform side connection policy for profile of the Bluetooth device, which is registered to deviceAddress. When isAllowed is set to true, the connection will allowed for the profile otherwise the connection will be disallowed.

Note: The connection policy of the remote device is not impacted and will not change.

Note: When the provided profile is not in connectableProfiles, this function will fail and return false.

Return

true when setting the policy was successful, false otherwise.