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

Commit be9368be authored by Chris Manton's avatar Chris Manton
Browse files

Const-ify BTM_SetLocalDeviceName

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

Change-Id: I4c65adf44e08015d5354da47afb6d8c5a8ead6ef
parent 54e7fa0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -508,7 +508,7 @@ static void bta_dm_wait_for_acl_to_drain_cback(void* data) {

/** Sets local device name */
void bta_dm_set_dev_name(const std::vector<uint8_t>& name) {
  BTM_SetLocalDeviceName((char*)name.data());
  BTM_SetLocalDeviceName((const char*)name.data());
  bta_dm_set_eir((char*)name.data());
}

+1 −1
Original line number Diff line number Diff line
@@ -871,7 +871,7 @@ bool BTM_IsDeviceUp(void);
 * Returns          BTM_CMD_STARTED if successful, otherwise an error
 *
 ******************************************************************************/
tBTM_STATUS BTM_SetLocalDeviceName(char* p_name);
tBTM_STATUS BTM_SetLocalDeviceName(const char* p_name);

/*******************************************************************************
 *
+1 −1
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ static void decode_controller_support() {
 * Returns          status of the operation
 *
 ******************************************************************************/
tBTM_STATUS BTM_SetLocalDeviceName(char* p_name) {
tBTM_STATUS BTM_SetLocalDeviceName(const char* p_name) {
  uint8_t* p;

  if (!p_name || !p_name[0] || (strlen((char*)p_name) > BD_NAME_LEN))
+1 −1
Original line number Diff line number Diff line
@@ -502,7 +502,7 @@ void GAP_BleAttrDBUpdate(uint16_t attr_uuid, tGAP_BLE_ATTR_VALUE* p_value) {
          break;

        case GATT_UUID_GAP_DEVICE_NAME:
          BTM_SetLocalDeviceName((char*)p_value->p_dev_name);
          BTM_SetLocalDeviceName((const char*)p_value->p_dev_name);
          break;

        case GATT_UUID_GAP_CENTRAL_ADDR_RESOL:
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ bool BTM_IsDeviceUp(void);
 * Returns          BTM_CMD_STARTED if successful, otherwise an error
 *
 ******************************************************************************/
tBTM_STATUS BTM_SetLocalDeviceName(char* p_name);
tBTM_STATUS BTM_SetLocalDeviceName(const char* p_name);

/*******************************************************************************
 *
Loading