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

Commit 46fb1415 authored by Thomas Girardier's avatar Thomas Girardier Committed by Automerger Merge Worker
Browse files

Merge "Fix dual mode dev ble adv update config issue" am: 9712e53b am: 9f5e8a0d

parents ec794744 9f5e8a0d
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -150,9 +150,20 @@ void bta_scan_results_cb_impl(RawAddress bd_addr, tBT_DEVICE_TYPE device_type,
  }

  dev_type = (bt_device_type_t)device_type;

  uint32_t remote_dev_type = 0;
  BTIF_STORAGE_FILL_PROPERTY(&properties, BT_PROPERTY_TYPE_OF_DEVICE,
    sizeof(remote_dev_type), &remote_dev_type);
  dev_type = (btif_storage_get_remote_device_property(&bd_addr, &properties) == BT_STATUS_SUCCESS) ?
    (bt_device_type_t)(remote_dev_type | device_type) : (bt_device_type_t)device_type;

  if ((remote_dev_type != dev_type) && (dev_type != 0)) {
    BTIF_TRACE_DEBUG("%s dev_type change 0x%x=>0x%x, update config",
          __func__, remote_dev_type, dev_type);
    BTIF_STORAGE_FILL_PROPERTY(&properties, BT_PROPERTY_TYPE_OF_DEVICE,
                               sizeof(dev_type), &dev_type);
    btif_storage_set_remote_device_property(&(bd_addr), &properties);
  }

  btif_storage_set_remote_addr_type(&bd_addr, addr_type);
  HAL_CBACK(bt_gatt_callbacks, scanner->scan_result_cb, ble_evt_type, addr_type,
+1 −1
Original line number Diff line number Diff line
@@ -669,7 +669,7 @@ static void btif_update_remote_properties(const RawAddress& bdaddr,

  /* class of device */
  cod = devclass2uint(dev_class);
  if (cod == 0) {
  if ((cod == 0) || (cod == COD_UNCLASSIFIED)) {
    /* Try to retrieve cod from storage */
    LOG_VERBOSE("class of device (cod) is unclassified, checking storage");
    BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties],