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

Commit 4455fb40 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[14/19] get_btm_client_interface().peer.BTM_ReadRemoteVersion" into...

Merge "[14/19] get_btm_client_interface().peer.BTM_ReadRemoteVersion" into main am: 93203d67 am: 6f5c3a68

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/3109681



Change-Id: I186cf4a506b55067a61a3f2a864cf1c8c665af61
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9671380f 6f5c3a68
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -36,15 +36,13 @@

#include "bta/gatt/bta_gattc_int.h"
#include "bta/gatt/database.h"
#include "common/init_flags.h"
#include "device/include/interop.h"
#include "internal_include/bt_target.h"
#include "internal_include/bt_trace.h"
#include "os/log.h"
#include "osi/include/allocator.h"
#include "stack/btm/btm_sec.h"
#include "stack/include/bt_types.h"
#include "stack/include/bt_uuid16.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/gatt_api.h"
#include "stack/include/sdp_api.h"
#include "types/bluetooth/uuid.h"
@@ -164,7 +162,8 @@ RobustCachingSupport GetRobustCachingSupport(const tBTA_GATTC_CLCB* p_clcb,
  }

  if (p_clcb->transport == BT_TRANSPORT_LE &&
      !BTM_IsRemoteVersionReceived(p_clcb->bda)) {
      !get_btm_client_interface().ble.BTM_IsRemoteVersionReceived(
          p_clcb->bda)) {
    log::info("version info is not ready yet");
    return RobustCachingSupport::W4_REMOTE_VERSION;
  }
@@ -175,7 +174,8 @@ RobustCachingSupport GetRobustCachingSupport(const tBTA_GATTC_CLCB* p_clcb,
  // embedded device having LMP version lower than 5.1 (0x0a), it does not
  // support GATT Caching.
  uint8_t lmp_version = 0;
  if (!BTM_ReadRemoteVersion(p_clcb->bda, &lmp_version, nullptr, nullptr)) {
  if (!get_btm_client_interface().peer.BTM_ReadRemoteVersion(
          p_clcb->bda, &lmp_version, nullptr, nullptr)) {
    log::warn("Could not read remote version for {}", p_clcb->bda);
  }

+3 −2
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
#include "stack/include/bt_types.h"
#include "stack/include/btm_api.h"
#include "stack/include/btm_ble_api.h"
#include "stack/include/btm_client_interface.h"

namespace bluetooth {
namespace bqr {
@@ -849,8 +850,8 @@ static void btif_get_remote_version(const RawAddress& bd_addr,
  uint16_t tmp_lmp_subver = 0;
  tBTM_STATUS status;

  status = BTM_ReadRemoteVersion(bd_addr, &tmp_lmp_ver, &tmp_manufacturer,
                                 &tmp_lmp_subver);
  status = get_btm_client_interface().peer.BTM_ReadRemoteVersion(
      bd_addr, &tmp_lmp_ver, &tmp_manufacturer, &tmp_lmp_subver);
  if (status == BTM_SUCCESS &&
      (tmp_lmp_ver || tmp_manufacturer || tmp_lmp_subver)) {
    lmp_version = tmp_lmp_ver;
+2 −1
Original line number Diff line number Diff line
@@ -665,7 +665,8 @@ static void btif_update_remote_version_property(RawAddress* p_bd) {
  log::assert_that(p_bd != nullptr, "assert failed: p_bd != nullptr");

  const bool version_info_valid =
      BTM_ReadRemoteVersion(*p_bd, &lmp_ver, &mfct_set, &lmp_subver);
      get_btm_client_interface().peer.BTM_ReadRemoteVersion(
          *p_bd, &lmp_ver, &mfct_set, &lmp_subver);

  log::info("Remote version info valid:{} [{}]:0x{:x},0x{:x},0x{:x}",
            version_info_valid, *p_bd, lmp_ver, mfct_set, lmp_subver);
+3 −4
Original line number Diff line number Diff line
@@ -21,9 +21,8 @@
#include "bta_sec_api.h"
#include "btif_storage.h"
#include "device/include/device_iot_config.h"
#include "internal_include/bt_target.h"
#include "os/log.h"
#include "stack/include/btm_ble_api.h"
#include "stack/include/btm_client_interface.h"

using namespace bluetooth;

@@ -135,8 +134,8 @@ void btif_iot_update_remote_info(tBTA_DM_AUTH_CMPL* p_auth_cmpl, bool is_ble,
                                 (int)p_auth_cmpl->addr_type);

  // save remote versions to iot conf file
  btm_status = BTM_ReadRemoteVersion(p_auth_cmpl->bd_addr, &lmp_ver, &mfct_set,
                                     &lmp_subver);
  btm_status = get_btm_client_interface().peer.BTM_ReadRemoteVersion(
      p_auth_cmpl->bd_addr, &lmp_ver, &mfct_set, &lmp_subver);

  if (btm_status == BTM_SUCCESS) {
    DEVICE_IOT_CONFIG_ADDR_SET_INT(p_auth_cmpl->bd_addr,
+3 −3
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
#include "device/include/interop_config.h"
#include "hci/controller_interface.h"
#include "main/shim/entry.h"
#include "os/log.h"
#include "osi/include/allocator.h"
#include "osi/include/properties.h"
#include "platform_ssl_mem.h"
@@ -53,6 +52,7 @@
#include "stack/include/btm_ble_addr.h"
#include "stack/include/btm_ble_privacy.h"
#include "stack/include/btm_ble_sec_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_log_history.h"
#include "stack/include/btm_status.h"
#include "stack/include/gatt_api.h"
@@ -1272,8 +1272,8 @@ static void btm_ble_notify_enc_cmpl(const RawAddress& bd_addr,
                                    bool encr_enable) {
  if (encr_enable) {
    uint8_t remote_lmp_version = 0;
    if (!BTM_ReadRemoteVersion(bd_addr, &remote_lmp_version, nullptr,
                               nullptr) ||
    if (!get_btm_client_interface().peer.BTM_ReadRemoteVersion(
            bd_addr, &remote_lmp_version, nullptr, nullptr) ||
        remote_lmp_version == 0) {
      log::warn("BLE Unable to determine remote version");
    }
Loading