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

Commit b01b27ba authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7239224 from 3270f0e1 to sc-release

Change-Id: I91aabd2ad41d3617a5d15d2e71c17ed1f8e758f8
parents 9c16b551 3270f0e1
Loading
Loading
Loading
Loading
+9 −7
Original line number Original line Diff line number Diff line
@@ -499,21 +499,23 @@ void bta_hh_api_disc_act(tBTA_HH_DEV_CB* p_cb, tBTA_HH_DATA* p_data) {
                   base::StringPrintf("le local initiated"));
                   base::StringPrintf("le local initiated"));


  } else {
  } else {
    /* found an active connection */
    const uint8_t hid_handle =
    const uint8_t hid_handle =
        (p_data != nullptr) ? static_cast<uint8_t>(p_data->hdr.layer_specific)
        (p_data != nullptr) ? static_cast<uint8_t>(p_data->hdr.layer_specific)
                            : p_cb->hid_handle;
                            : p_cb->hid_handle;
    LOG_DEBUG("Host initiating close to classic device:%s",
              PRIVATE_ADDRESS(p_cb->addr));
    tHID_STATUS status = HID_HostCloseDev(hid_handle);
    tHID_STATUS status = HID_HostCloseDev(hid_handle);
    if (status != HID_SUCCESS) {
    if (status != HID_SUCCESS) {
      LOG_WARN("Failed closing classic device:%s status:%s",
      LOG_WARN("Failed closing classic device:%s status:%s",
               PRIVATE_ADDRESS(p_cb->addr), hid_status_text(status).c_str());
               PRIVATE_ADDRESS(p_cb->addr), hid_status_text(status).c_str());
    } else {
      LOG_DEBUG("Host initiated close to classic device:%s",
                PRIVATE_ADDRESS(p_cb->addr));
    }
    tBTA_HH bta_hh = {
    tBTA_HH bta_hh = {
          .dev_status = {.status = BTA_HH_ERR, .handle = hid_handle},
        .dev_status = {.status =
                           (status == HID_SUCCESS) ? BTA_HH_OK : BTA_HH_ERR,
                       .handle = hid_handle},
    };
    };
    (*bta_hh_cb.p_cback)(BTA_HH_CLOSE_EVT, &bta_hh);
    (*bta_hh_cb.p_cback)(BTA_HH_CLOSE_EVT, &bta_hh);
    }
    BTM_LogHistory(kBtmLogTag, p_cb->addr, "Closed",
    BTM_LogHistory(kBtmLogTag, p_cb->addr, "Closed",
                   base::StringPrintf("classic local reason %s",
                   base::StringPrintf("classic local reason %s",
                                      hid_status_text(status).c_str()));
                                      hid_status_text(status).c_str()));
+7 −0
Original line number Original line Diff line number Diff line
@@ -18,7 +18,9 @@
#ifndef BTA_HH_API_H
#ifndef BTA_HH_API_H
#define BTA_HH_API_H
#define BTA_HH_API_H


#include <base/strings/stringprintf.h>
#include <cstdint>
#include <cstdint>
#include <string>


#include "bta/include/bta_api.h"
#include "bta/include/bta_api.h"
#include "stack/include/hiddefs.h"
#include "stack/include/hiddefs.h"
@@ -220,6 +222,11 @@ typedef struct {


  uint8_t flag;
  uint8_t flag;
  tBTA_HH_DEV_DESCR descriptor;
  tBTA_HH_DEV_DESCR descriptor;

  std::string ToString() const {
    return base::StringPrintf("%04x::%04x::%04x", vendor_id, product_id,
                              version);
  }
} tBTA_HH_DEV_DSCP_INFO;
} tBTA_HH_DEV_DSCP_INFO;


/* callback event data for BTA_HH_OPEN_EVT */
/* callback event data for BTA_HH_OPEN_EVT */
+2 −2
Original line number Original line Diff line number Diff line
@@ -211,9 +211,9 @@ uint16_t acl_get_supported_packet_types() {
  mock_function_count_map[__func__]++;
  mock_function_count_map[__func__]++;
  return 0;
  return 0;
}
}
uint16_t btm_get_acl_disc_reason_code(void) {
tHCI_REASON btm_get_acl_disc_reason_code(void) {
  mock_function_count_map[__func__]++;
  mock_function_count_map[__func__]++;
  return 0;
  return HCI_SUCCESS;
}
}
uint8_t BTM_SetTraceLevel(uint8_t new_level) {
uint8_t BTM_SetTraceLevel(uint8_t new_level) {
  mock_function_count_map[__func__]++;
  mock_function_count_map[__func__]++;
+7 −2
Original line number Original line Diff line number Diff line
@@ -1542,11 +1542,16 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) {
      btm_set_bond_type_dev(p_data->link_down.bd_addr,
      btm_set_bond_type_dev(p_data->link_down.bd_addr,
                            tBTM_SEC_DEV_REC::BOND_TYPE_UNKNOWN);
                            tBTM_SEC_DEV_REC::BOND_TYPE_UNKNOWN);
      btif_av_acl_disconnected(bd_addr);
      btif_av_acl_disconnected(bd_addr);
      BTIF_TRACE_DEBUG(
          "BTA_DM_LINK_DOWN_EVT. Sending BT_ACL_STATE_DISCONNECTED");
      invoke_acl_state_changed_cb(BT_STATUS_SUCCESS, bd_addr,
      invoke_acl_state_changed_cb(BT_STATUS_SUCCESS, bd_addr,
                                  BT_ACL_STATE_DISCONNECTED,
                                  BT_ACL_STATE_DISCONNECTED,
                                  static_cast<bt_hci_error_code_t>(btm_get_acl_disc_reason_code()));
                                  static_cast<bt_hci_error_code_t>(btm_get_acl_disc_reason_code()));
      LOG_DEBUG(
          "Sent BT_ACL_STATE_DISCONNECTED upward as ACL link down event "
          "device:%s reason:%s",
          PRIVATE_ADDRESS(bd_addr),
          hci_reason_code_text(
              static_cast<tHCI_REASON>(btm_get_acl_disc_reason_code()))
              .c_str());
      break;
      break;


    case BTA_DM_BLE_KEY_EVT:
    case BTA_DM_BLE_KEY_EVT:
+0 −10
Original line number Original line Diff line number Diff line
@@ -7,16 +7,6 @@ package {
    default_applicable_licenses: ["system_bt_license"],
    default_applicable_licenses: ["system_bt_license"],
}
}


filegroup {
    name: "BluetoothCommonSourcesForRootCanal",
    srcs: [
        "init_flags.cc",
        "metric_id_manager.cc",
        "strings.cc",
        "stop_watch.cc",
    ],
}

filegroup {
filegroup {
    name: "BluetoothCommonSources",
    name: "BluetoothCommonSources",
    srcs: [
    srcs: [
Loading