/* store parameters */
if (p_data) {
client_cb->peer_addr = p_data->api_open.bd_addr;
- client_cb->cli_sec_mask = p_data->api_open.sec_mask;
}
/* Check if RFCOMM has any incoming connection to avoid collision. */
* Returns void
*
******************************************************************************/
-void BTA_HfClientOpen(const RawAddress& bd_addr, tBTA_SEC sec_mask,
- uint16_t* p_handle) {
+void BTA_HfClientOpen(const RawAddress& bd_addr, uint16_t* p_handle) {
APPL_TRACE_DEBUG("%s", __func__);
tBTA_HF_CLIENT_API_OPEN* p_buf =
(tBTA_HF_CLIENT_API_OPEN*)osi_malloc(sizeof(tBTA_HF_CLIENT_API_OPEN));
p_buf->hdr.event = BTA_HF_CLIENT_API_OPEN_EVT;
p_buf->hdr.layer_specific = *p_handle;
p_buf->bd_addr = bd_addr;
- p_buf->sec_mask = sec_mask;
bta_sys_sendmsg(p_buf);
}
BT_HDR hdr;
RawAddress bd_addr;
uint16_t* handle;
- tBTA_SEC sec_mask;
} tBTA_HF_CLIENT_API_OPEN;
/* data type for BTA_HF_CLIENT_DISC_RESULT_EVT */
RawAddress peer_addr; /* peer bd address */
tSDP_DISCOVERY_DB* p_disc_db; /* pointer to discovery database */
uint16_t conn_handle; /* RFCOMM handle of connected service */
- tBTA_SEC cli_sec_mask; /* client security mask */
tBTA_HF_CLIENT_PEER_FEAT peer_features; /* peer device features */
tBTA_HF_CLIENT_CHLD_FEAT chld_features; /* call handling features */
uint16_t peer_version; /* profile version of peer device */
tBTA_HF_CLIENT_DATA msg;
msg.hdr.layer_specific = client_cb->handle;
msg.api_open.bd_addr = client_cb->peer_addr;
- msg.api_open.sec_mask = client_cb->cli_sec_mask;
bta_hf_client_start_open(&msg);
}
}
UUID_SERVCLASS_HF_HANDSFREE, client_cb->peer_scn, false,
BTA_HF_CLIENT_MTU, client_cb->peer_addr, &(client_cb->conn_handle),
bta_hf_client_mgmt_cback, BTM_SEC_SERVICE_HF_HANDSFREE,
- client_cb->cli_sec_mask) == PORT_SUCCESS) {
+ BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT) == PORT_SUCCESS) {
bta_hf_client_setup_port(client_cb->conn_handle);
APPL_TRACE_DEBUG("bta_hf_client_rfc_do_open : conn_handle = %d",
client_cb->conn_handle);
* Returns void
*
******************************************************************************/
-void BTA_HfClientOpen(const RawAddress& bd_addr, tBTA_SEC sec_mask,
- uint16_t* p_handle);
+void BTA_HfClientOpen(const RawAddress& bd_addr, uint16_t* p_handle);
/*******************************************************************************
*
#define LOG_TAG "bt_btif_hfc"
-#include <stdlib.h>
#include <string.h>
#include <hardware/bluetooth.h>
#include <hardware/bt_hf_client.h>
-#include "bt_utils.h"
#include "bta_hf_client_api.h"
#include "btif_common.h"
#include "btif_profile_queue.h"
#define BTIF_HF_CLIENT_SERVICE_NAME ("Handsfree")
#endif
-#ifndef BTIF_HF_CLIENT_SECURITY
-#define BTIF_HF_CLIENT_SECURITY (BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT)
-#endif
-
#ifndef BTIF_HF_CLIENT_FEATURES
#define BTIF_HF_CLIENT_FEATURES \
(BTA_HF_CLIENT_FEAT_ECNR | BTA_HF_CLIENT_FEAT_3WAY | \
* The handle is valid until we have called BTA_HfClientClose or the LL
* has notified us of channel close due to remote closing, error etc.
*/
- BTA_HfClientOpen(cb->peer_bda, BTIF_HF_CLIENT_SECURITY, &cb->handle);
+ BTA_HfClientOpen(cb->peer_bda, &cb->handle);
return BT_STATUS_SUCCESS;
}