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

Commit 0e84b19f authored by Mike J. Chen's avatar Mike J. Chen Committed by Android (Google) Code Review
Browse files

Merge "Make auto connect work for multiple known BLE devices" into lmp-dev

parents b98575da b032fc39
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -671,11 +671,14 @@ tBTM_BLE_CONN_ST btm_ble_get_conn_st(void)
void btm_ble_set_conn_st(tBTM_BLE_CONN_ST new_st)
{
    btm_cb.ble_ctr_cb.conn_state = new_st;
    if (new_st == BLE_BG_CONN || new_st == BLE_DIR_CONN)
    if (new_st == BLE_BG_CONN || new_st == BLE_DIR_CONN) {
        btm_cb.ble_ctr_cb.wl_state |= BTM_BLE_WL_INIT;
        btm_ble_set_topology_mask(BTM_BLE_STATE_INIT_BIT);
    else
    } else {
        btm_cb.ble_ctr_cb.wl_state &= ~BTM_BLE_WL_INIT;
        btm_ble_clear_topology_mask(BTM_BLE_STATE_INIT_BIT);
    }
}

/*******************************************************************************
**
+6 −1
Original line number Diff line number Diff line
@@ -2576,10 +2576,13 @@ tBTM_STATUS btm_ble_start_scan (UINT8 filter_enable)
    tBTM_STATUS status = BTM_CMD_STARTED;

    /* start scan, disable duplicate filtering */
    if (!btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_ENABLE, filter_enable))
    if (!btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_ENABLE, filter_enable)) {
        status = BTM_NO_RESOURCES;
        btm_cb.ble_ctr_cb.wl_state &= ~BTM_BLE_WL_SCAN;
    }
    else
    {
        btm_cb.ble_ctr_cb.wl_state |= BTM_BLE_WL_SCAN;
        if (p_inq->scan_type == BTM_BLE_SCAN_MODE_ACTI)
            btm_ble_set_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
        else
@@ -2608,6 +2611,8 @@ void btm_ble_stop_scan(void)
    btsnd_hcic_ble_set_scan_enable (BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE);

    btm_update_scanner_filter_policy(SP_ADV_ALL);

    btm_cb.ble_ctr_cb.wl_state &= ~BTM_BLE_WL_SCAN;
}
/*******************************************************************************
**