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

Commit b694624c authored by Zhihai Xu's avatar Zhihai Xu Committed by Android (Google) Code Review
Browse files

Merge "Pairing with dissapeard HID decive never times out (in UI)"

parents dc0c87bd ca95d192
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1934,6 +1934,25 @@ bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t *bd_addr)
    return BT_STATUS_SUCCESS;
}

/*******************************************************************************
**
** Function         btif_dm_hh_open_failed
**
** Description      informs the upper layers if the HH have failed during bonding
**
** Returns          none
**
*******************************************************************************/

void btif_dm_hh_open_failed(bt_bdaddr_t *bdaddr)
{
    if (pairing_cb.state == BT_BOND_STATE_BONDING &&
            bdcmp(bdaddr->address, pairing_cb.bd_addr) == 0)
    {
        bond_state_changed(BT_STATUS_FAIL, bdaddr, BT_BOND_STATE_NONE);
    }
}

/*******************************************************************************
**
** Function         btif_dm_remove_bond
+2 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@ extern BOOLEAN check_cod(const bt_bdaddr_t *remote_bdaddr, uint32_t cod);
extern void btif_dm_cb_remove_bond(bt_bdaddr_t *bd_addr);
extern BOOLEAN check_cod_hid(const bt_bdaddr_t *remote_bdaddr, uint32_t cod);
extern int  scru_ascii_2_hex(char *p_ascii, int len, UINT8 *p_hex);
extern void btif_dm_hh_open_failed(bt_bdaddr_t *bdaddr);

/*****************************************************************************
**  Local Function prototypes
@@ -842,6 +843,7 @@ static void btif_hh_upstreams_evt(UINT16 event, char* p_param)
            }
            else {
                bt_bdaddr_t *bdaddr = (bt_bdaddr_t*)p_data->conn.bda;
                btif_dm_hh_open_failed(bdaddr);
                HAL_CBACK(bt_hh_callbacks, connection_state_cb, (bt_bdaddr_t*) &p_data->conn.bda,BTHH_CONN_STATE_DISCONNECTED);
                btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED;
            }