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

Commit 43548575 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

BTM_SecAddDevice: features is always nullptr

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0ed7e76d824bc7da08bf7fe93dda9067d390e59f
parent 54f5dd28
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -100,22 +100,7 @@ bool BTM_SecAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
  }

  p_dev_rec->num_read_pages = 0;
  if (features) {
    bool found = false;
    memcpy(p_dev_rec->feature_pages, features,
           sizeof(p_dev_rec->feature_pages));
    for (int i = HCI_EXT_FEATURES_PAGE_MAX; !found && i >= 0; i--) {
      for (int j = 0; j < HCI_FEATURE_BYTES_PER_PAGE; j++) {
        if (p_dev_rec->feature_pages[i][j] != 0) {
          found = true;
          p_dev_rec->num_read_pages = i + 1;
          break;
        }
      }
    }
  } else {
  memset(p_dev_rec->feature_pages, 0, sizeof(p_dev_rec->feature_pages));
  }

  if (p_link_key) {
    VLOG(2) << __func__ << ": BDA: " << bd_addr;