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

Commit 0af8dd67 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

gd_shim_acl: Plumb stack/acl/btm_acl::on_acl_br_edr_{success,failed} am: 7af046d2

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52183779ea3437447f29fc59dadb84cfd695c62a
parents 243ba7ca 7af046d2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -957,7 +957,7 @@ void bluetooth::shim::legacy::Acl::OnConnectSuccess(
      ->ReadRemoteControllerInformation();

  TRY_POSTING_ON_MAIN(acl_interface_.connection.classic.on_connected, bd_addr,
                      handle, HCI_SUCCESS, false);
                      handle, false);
  LOG_DEBUG("Connection successful classic remote:%s handle:%hu initiator:%s",
            PRIVATE_ADDRESS(remote_address), handle,
            (locally_initiated) ? "local" : "remote");
@@ -970,7 +970,7 @@ void bluetooth::shim::legacy::Acl::OnConnectFail(hci::Address address,
                                                 hci::ErrorCode reason) {
  const RawAddress bd_addr = ToRawAddress(address);
  TRY_POSTING_ON_MAIN(acl_interface_.connection.classic.on_failed, bd_addr,
                      kInvalidHciHandle, ToLegacyHciErrorCode(reason), false);
                      ToLegacyHciErrorCode(reason));
  LOG_WARN("Connection failed classic remote:%s reason:%s",
           PRIVATE_ADDRESS(address), hci::ErrorCodeText(reason).c_str());
  BTM_LogHistory(kBtmLogTag, ToRawAddress(address), "Connection failed",
+2 −2
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ const acl_interface_t GetAclInterface() {
      .on_send_data_upwards = acl_rcv_acl_data,
      .on_packets_completed = acl_packets_completed,

      .connection.classic.on_connected = btm_acl_connected,
      .connection.classic.on_failed = btm_acl_connected,
      .connection.classic.on_connected = on_acl_br_edr_connected,
      .connection.classic.on_failed = on_acl_br_edr_failed,
      .connection.classic.on_disconnected = btm_acl_disconnected,

      .connection.le.on_connected =
+2 −3
Original line number Diff line number Diff line
@@ -29,9 +29,8 @@ namespace legacy {

typedef struct {
  void (*on_connected)(const RawAddress& bda, uint16_t handle,
                       tHCI_STATUS status, uint8_t enc_mode);
  void (*on_failed)(const RawAddress& bda, uint16_t handle, tHCI_STATUS status,
                       uint8_t enc_mode);
  void (*on_failed)(const RawAddress& bda, tHCI_STATUS status);
  void (*on_disconnected)(tHCI_STATUS status, uint16_t handle,
                          tHCI_STATUS reason);
} acl_classic_connection_interface_t;
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@
void btm_acl_connection_request(const RawAddress& bda, uint8_t* dc);
void btm_acl_connected(const RawAddress& bda, uint16_t handle,
                       tHCI_STATUS status, uint8_t enc_mode);
void on_acl_br_edr_connected(const RawAddress& bda, uint16_t handle,
                             uint8_t enc_mode);
void on_acl_br_edr_failed(const RawAddress& bda, tHCI_STATUS status);
void btm_acl_disconnected(tHCI_STATUS status, uint16_t handle,
                          tHCI_STATUS reason);
void btm_acl_encrypt_change(uint16_t handle, uint8_t status,