Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88efeecb authored by Matthew Xie's avatar Matthew Xie Committed by Android (Google) Code Review
Browse files

Merge "Bluetooth: fix the HOGP device(iBUFFALO BSMBB09DS) pair and reconnect problem." into lmp-dev

parents b3ba5c3a d866e18d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2612,7 +2612,7 @@ static void bta_hh_le_add_dev_bg_conn(tBTA_HH_DEV_CB *p_cb, BOOLEAN check_bond)
    {
        /* start reconnection if remote is a bonded device */
        /* verify bond */
        BTM_GetSecurityFlags(p_cb->addr, &sec_flag);
        BTM_GetSecurityFlagsByTransport(p_cb->addr, &sec_flag, BT_TRANSPORT_LE);

        if ((sec_flag & BTM_SEC_FLAG_LKEY_KNOWN) == 0)
            to_add = FALSE;
+22 −19
Original line number Diff line number Diff line
@@ -501,19 +501,8 @@ static void btif_dm_cb_hid_remote_name(tBTM_REMOTE_DEV_NAME *p_remote_name)
static void btif_dm_cb_create_bond(bt_bdaddr_t *bd_addr)
{
    BOOLEAN is_hid = check_cod(bd_addr, COD_HID_POINTING);


    bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING);

    if (is_hid){

            int status;
            status = btif_hh_connect(bd_addr);
            if(status != BT_STATUS_SUCCESS)
                bond_state_changed(status, bd_addr, BT_BOND_STATE_NONE);
    }
    else
    {
#if BLE_INCLUDED == TRUE
    int device_type;
    int addr_type;
@@ -526,6 +515,20 @@ static void btif_dm_cb_create_bond(bt_bdaddr_t *bd_addr)
        BTA_DmAddBleDevice(bd_addr->address, addr_type, BT_DEVICE_TYPE_BLE);
    }
#endif

#if BLE_INCLUDED == TRUE
    if(is_hid && device_type != BT_DEVICE_TYPE_BLE)
#else
    if(is_hid)
#endif
    {
        int status;
        status = btif_hh_connect(bd_addr);
        if(status != BT_STATUS_SUCCESS)
            bond_state_changed(status, bd_addr, BT_BOND_STATE_NONE);
    }
    else
    {
        BTA_DmBond ((UINT8 *)bd_addr->address);
    }
    /*  Track  originator of bond creation  */
+0 −1
Original line number Diff line number Diff line
@@ -513,7 +513,6 @@ void gap_ble_cl_op_cmpl(tGAP_CLCB *p_clcb, BOOLEAN status, UINT16 len, UINT8 *p_
            (* p_dev_name_cback)(status, p_clcb->bda, len, (char *)p_name);
    }

        GATT_Disconnect(p_clcb->conn_id);

}

+0 −1
Original line number Diff line number Diff line
@@ -908,7 +908,6 @@ void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)

    SMP_TRACE_DEBUG ("smp_pairing_cmpl ");

    (void)L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, TRUE);
    if ((p_cb->status == SMP_SUCCESS) ||
        (p_cb->status <= SMP_REPEATED_ATTEMPTS && p_cb->status != SMP_SUCCESS))
    {