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

Commit 256b57fa authored by Chris Manton's avatar Chris Manton
Browse files

stack::rnr::btm_initiate_rem_name [3/5] Extract page_scan_rep_mode

Bug: 354452689
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: Idfa3341ff58f8ed02187a6cfeeafbdcb66860522
parent 41fc5264
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1861,6 +1861,7 @@ tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint64_t timeout
  }

  uint16_t clock_offset = get_clock_offset_from_storage(remote_bda);
  uint8_t page_scan_rep_mode = HCI_PAGE_SCAN_REP_MODE_R1;

  /* If the database entry exists for the device, use its clock offset */
  tINQ_DB_ENT* p_i = btm_inq_db_find(remote_bda);
@@ -1870,7 +1871,7 @@ tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint64_t timeout
    if (0 == (p_cur->results.clock_offset & BTM_CLOCK_OFFSET_VALID)) {
      clock_offset = get_clock_offset_from_storage(remote_bda);
    }
    uint8_t page_scan_rep_mode = p_cur->results.page_scan_rep_mode;
    page_scan_rep_mode = p_cur->results.page_scan_rep_mode;
    if (com::android::bluetooth::flags::rnr_validate_page_scan_repetition_mode() &&
        page_scan_rep_mode >= HCI_PAGE_SCAN_REP_MODE_RESERVED_START) {
      log::info(
@@ -1882,7 +1883,7 @@ tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint64_t timeout
    bluetooth::shim::ACL_RemoteNameRequest(remote_bda, page_scan_rep_mode,
                                           p_cur->results.page_scan_mode, clock_offset);
  } else {
    bluetooth::shim::ACL_RemoteNameRequest(remote_bda, HCI_PAGE_SCAN_REP_MODE_R1,
    bluetooth::shim::ACL_RemoteNameRequest(remote_bda, page_scan_rep_mode,
                                           HCI_MANDATARY_PAGE_SCAN_MODE, clock_offset);
  }