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

Commit 741f621f authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Merge "[Invisalign2] Move one reject connection op out of btm_sec_conn_req"...

Merge "[Invisalign2] Move one reject connection op out of btm_sec_conn_req" into main am: 412ed781

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2837395



Change-Id: Ib6a18d9ebc1fdbfa1a08c0dd5aadf72e5681d3aa
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a6773693 412ed781
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2564,6 +2564,15 @@ void btm_connection_request(const RawAddress& bda,
                            const bluetooth::types::ClassOfDevice& cod) {
  // Copy Cod information
  DEV_CLASS dc;

  /* Some device may request a connection before we are done with the HCI_Reset
   * sequence */
  if (!controller_get_interface()->get_is_ready()) {
    LOG_VERBOSE("Security Manager: connect request when device not ready");
    btsnd_hcic_reject_conn(bda, HCI_ERR_HOST_REJECT_DEVICE);
    return;
  }

  dc[0] = cod.cod[2], dc[1] = cod.cod[1], dc[2] = cod.cod[0];

  btm_sec_conn_req(bda, dc);
+0 −8
Original line number Diff line number Diff line
@@ -2076,14 +2076,6 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
void btm_sec_conn_req(const RawAddress& bda, const DEV_CLASS dc) {
  tBTM_SEC_DEV_REC* p_dev_rec = nullptr;

  /* Some device may request a connection before we are done with the HCI_Reset
   * sequence */
  if (!controller_get_interface()->get_is_ready()) {
    LOG_VERBOSE("Security Manager: connect request when device not ready");
    btsnd_hcic_reject_conn(bda, HCI_ERR_HOST_REJECT_DEVICE);
    return;
  }

  if ((btm_sec_cb.pairing_state != BTM_PAIR_STATE_IDLE) &&
      (btm_sec_cb.pairing_flags & BTM_PAIR_FLAGS_WE_STARTED_DD) &&
      (btm_sec_cb.pairing_bda == bda)) {