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

Commit 405a1c7e authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Streamline stack/acl/btm_acl::BTM_IsAclConnectionUp am: f5429724

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1455172

Change-Id: I041fc924c3f305c6a226ba6d11e3565b8cd0067b
parents 98acb087 f5429724
Loading
Loading
Loading
Loading
+1 −22
Original line number Diff line number Diff line
@@ -1211,30 +1211,9 @@ tBTM_STATUS BTM_SetLinkSuperTout(const RawAddress& remote_bda,
  return (BTM_UNKNOWN_ADDR);
}

/*******************************************************************************
 *
 * Function         BTM_IsAclConnectionUp
 *
 * Description      This function is called to check if an ACL connection exists
 *                  to a specific remote BD Address.
 *
 * Returns          true if connection is up, else false.
 *
 ******************************************************************************/
bool BTM_IsAclConnectionUp(const RawAddress& remote_bda,
                           tBT_TRANSPORT transport) {
  tACL_CONN* p;

  VLOG(2) << __func__ << " RemBdAddr: " << remote_bda;

  p = internal_.btm_bda_to_acl(remote_bda, transport);
  if (p != (tACL_CONN*)NULL) {
    LOG_WARN("Unable to find active acl");
    return (true);
  }

  /* If here, no BD Addr found */
  return (false);
  return internal_.btm_bda_to_acl(remote_bda, transport) != nullptr;
}

bool BTM_IsAclConnectionUpAndHandleValid(const RawAddress& remote_bda,