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

Commit 6d1e50bd authored by Chris Manton's avatar Chris Manton
Browse files

Remove useless layer(s) of indirection

Bug: 191555414
Tag: #refactor
Test: gd/cert/run

Change-Id: I8d14b8ac642d8a3adc52032aeffb1edcd64f9673
parent 2eeb04bc
Loading
Loading
Loading
Loading
+0 −34
Original line number Diff line number Diff line
@@ -308,40 +308,6 @@ void BTA_GetEirService(uint8_t* p_eir, size_t eir_len,
  }
}

/*******************************************************************************
 *
 * Function         BTA_AddEirUuid
 *
 * Description      Request to add a service class UID to the local
 *                  device's EIR data.
 *
 * Parameters       uuid16 - The service class UUID you wish to add
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_AddEirUuid(uint16_t uuid16) {
  APPL_TRACE_API("%s: %d", __func__, uuid16);
  bta_sys_add_uuid(uuid16);
}

/*******************************************************************************
 *
 * Function         BTA_RemoveEirUuid
 *
 * Description      Request to remove a service class UID from the local
 *                  device's EIR data.
 *
 * Parameters       uuid16 - The service class UUID you wish to remove
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_RemoveEirUuid(uint16_t uuid16) {
  APPL_TRACE_API("%s: %d", __func__, uuid16);
  bta_sys_remove_uuid(uuid16);
}

/*******************************************************************************
 *
 * Function         BTA_DmGetConnectionState
+0 −28
Original line number Diff line number Diff line
@@ -866,34 +866,6 @@ extern tBTA_STATUS BTA_DmRemoveDevice(const RawAddress& bd_addr);
extern void BTA_GetEirService(uint8_t* p_eir, size_t eir_len,
                              tBTA_SERVICE_MASK* p_services);

/*******************************************************************************
 *
 * Function         BTA_AddEirUuid
 *
 * Description      Request to add a new service class UUID to the local
 *                  device's EIR data.
 *
 * Parameters       uuid16 - The service class UUID you wish to add
 *
 * Returns          void
 *
 ******************************************************************************/
extern void BTA_AddEirUuid(uint16_t uuid16);

/*******************************************************************************
 *
 * Function         BTA_RemoveEirUuid
 *
 * Description      Request to remove a service class UID from the local
 *                  device's EIR data.
 *
 * Parameters       uuid16 - The service class UUID you wish to remove
 *
 * Returns          void
 *
 ******************************************************************************/
extern void BTA_RemoveEirUuid(uint16_t uuid16);

/*******************************************************************************
 *
 * Function         BTA_DmGetConnectionState
+3 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <sstream>

#include "abstract_message_loop.h"
#include "bta/sys/bta_sys.h"
#include "btif_av.h"
#include "btif_common.h"
#include "btif_dm.h"
@@ -295,7 +296,7 @@ void AvrcpService::Init(MediaInterface* media_interface,
                             "AV Remote Control Target", NULL,
                             supported_features, sdp_record_handle, true,
                             profile_version, 0);
  btif_dm_add_uuid_to_eir(UUID_SERVCLASS_AV_REM_CTRL_TARGET);
  bta_sys_add_uuid(UUID_SERVCLASS_AV_REM_CTRL_TARGET);

  media_interface_ = new MediaInterfaceWrapper(media_interface);
  media_interface->RegisterUpdateCallback(instance_);
@@ -331,7 +332,7 @@ void AvrcpService::Cleanup() {
  LOG(INFO) << "AVRCP Target Service stopped";

  avrcp_interface_.RemoveRecord(sdp_record_handle);
  btif_dm_remove_uuid_from_eir(UUID_SERVCLASS_AV_REM_CTRL_TARGET);
  bta_sys_remove_uuid(UUID_SERVCLASS_AV_REM_CTRL_TARGET);
  sdp_record_handle = -1;

  connection_handler_->CleanUp();
+0 −4
Original line number Diff line number Diff line
@@ -69,10 +69,6 @@ void btif_dm_generate_local_oob_data(tBT_TRANSPORT transport);
/*callout for reading SMP properties from Text file*/
bool btif_dm_get_smp_config(tBTE_APPL_CFG* p_cfg);

/* EIR functions */
void btif_dm_add_uuid_to_eir(uint16_t uuid16);
void btif_dm_remove_uuid_from_eir(uint16_t uuid16);

typedef struct {
  bool is_penc_key_rcvd;
  tBTM_LE_PENC_KEYS penc_key; /* received peer encryption key */
+0 −28
Original line number Diff line number Diff line
@@ -3058,34 +3058,6 @@ void btif_dm_on_disable() {
 ******************************************************************************/
void btif_dm_read_energy_info() { BTA_DmBleGetEnergyInfo(bta_energy_info_cb); }

/*******************************************************************************
 *
 * Function        btif_dm_add_uuid_to_eir
 *
 * Description     Add a service class uuid to the local device's EIR data
 *
 * Returns         void
 *
 ******************************************************************************/
void btif_dm_add_uuid_to_eir(uint16_t uuid16) {
  BTIF_TRACE_DEBUG("%s: %d", __func__, uuid16);
  BTA_AddEirUuid(uuid16);
}

/*******************************************************************************
 *
 * Function        btif_dm_remove_uuid_from_eir
 *
 * Description     Remove a service class uuid from the local device's EIR data
 *
 * Returns         void
 *
 ******************************************************************************/
void btif_dm_remove_uuid_from_eir(uint16_t uuid16) {
  BTIF_TRACE_DEBUG("%s: %d", __func__, uuid16);
  BTA_RemoveEirUuid(uuid16);
}

static char* btif_get_default_local_name() {
  if (btif_default_local_name[0] == '\0') {
    int max_len = sizeof(btif_default_local_name) - 1;
Loading