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

Commit 36f11beb authored by Bhakthavatsala Raghavendra's avatar Bhakthavatsala Raghavendra Committed by Gerrit Code Review
Browse files

Merge "Trigger security procedure on l2cap connection request from remote" into main

parents 903f80ec 91e0391c
Loading
Loading
Loading
Loading
+20 −15
Original line number Diff line number Diff line
@@ -1566,6 +1566,8 @@ tBTM_STATUS btm_sec_l2cap_access_req_by_requirement(const RawAddress& bd_addr,
            "enc: x{:x}",
            p_dev_rec->sec_rec.sec_flags & BTM_SEC_AUTHENTICATED,
            p_dev_rec->sec_rec.sec_flags & BTM_SEC_ENCRYPTED);

    if (!com::android::bluetooth::flags::trigger_sec_proc_on_inc_access_req()) {
      /* SM4, but we do not know for sure which level of security we need.
       * as long as we have a link key, it's OK */
      if ((0 == (p_dev_rec->sec_rec.sec_flags & BTM_SEC_AUTHENTICATED)) ||
@@ -1583,6 +1585,9 @@ tBTM_STATUS btm_sec_l2cap_access_req_by_requirement(const RawAddress& bd_addr,

        return tBTM_STATUS::BTM_SUCCESS;
      }
    } else {
       log::debug("force fallthrough to trigger sec proceudure");
    }
  }

  p_dev_rec->sec_rec.p_callback = p_callback;