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

Commit 57b8fa40 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 37133c82: Merge "For pairing over le transport, set default device type and...

am 37133c82: Merge "For pairing over le transport, set default device type and address type" into lmp-dev

* commit '37133c82':
  For pairing over le transport, set default device type and address type
parents 6627b4e5 37133c82
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -598,6 +598,17 @@ static void btif_dm_cb_create_bond(bt_bdaddr_t *bd_addr, tBTA_TRANSPORT transpor
    int addr_type;
    bdstr_t bdstr;
    bd2str(bd_addr, &bdstr);
    if (transport == BT_TRANSPORT_LE)
    {
        if (!btif_config_get_int("Remote", (char const *)&bdstr,"DevType", &device_type))
        {
            btif_config_set_int("Remote", bdstr, "DevType", BT_DEVICE_TYPE_BLE);
        }
        if (btif_storage_get_remote_addr_type(bd_addr, &addr_type) != BT_STATUS_SUCCESS)
        {
            btif_storage_set_remote_addr_type(bd_addr, BLE_ADDR_PUBLIC);
        }
    }
    if((btif_config_get_int("Remote", (char const *)&bdstr,"DevType", &device_type) &&
       (btif_storage_get_remote_addr_type(bd_addr, &addr_type) == BT_STATUS_SUCCESS) &&
       (device_type == BT_DEVICE_TYPE_BLE)) || (transport == BT_TRANSPORT_LE))