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

Commit 30cfbb3f authored by Hui Peng's avatar Hui Peng
Browse files

Backport "Reject access to ... temp bonding [2]"

Original: ag/24734375

Bug: 294854926
Test: m com.android.btservices
Flag: EXEMPT backport
Merged-In: I10fcc2dcd78fc22ffbe3c425669fc9889b94a166
Change-Id: I10fcc2dcd78fc22ffbe3c425669fc9889b94a166
parent 8b2cc6e5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1982,6 +1982,11 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
                               security_required, p_callback, p_ref_data);
    } else /* rc == BTM_SUCCESS */
    {
      if (access_secure_service_from_temp_bond(p_dev_rec,
          is_originator, security_required)) {
        LOG_ERROR("Trying to access a secure rfcomm service from a temp bonding, rejecting");
        rc = BTM_FAILED_ON_SECURITY;
      }
      if (p_callback) {
        LOG_DEBUG("Notifying client that security access has been granted");
        (*p_callback)(&bd_addr, transport, p_ref_data, rc);