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

Commit 976d7853 authored by Aritra Sen's avatar Aritra Sen
Browse files

Change the BTIF Interface param for connect() in HFP Client.

Changed from `RawAddress*` to `const RawAddress*` since these params shouldn't be getting modified anyways.

Test: mma -j $(nproc)
Test: ./build.py
Change-Id: I827a7a70a09721abe549ce048ef798c61193b67b
parent d32d2577
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -546,7 +546,8 @@ static jboolean connectNative(JNIEnv* env, jobject object, jbyteArray address) {
    return JNI_FALSE;
  }

  bt_status_t status = sBluetoothHfpClientInterface->connect((RawAddress*)addr);
  bt_status_t status =
      sBluetoothHfpClientInterface->connect((const RawAddress*)addr);
  if (status != BT_STATUS_SUCCESS) {
    ALOGE("Failed AG connection, status: %d", status);
  }
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ static bt_status_t connect_int(RawAddress* bd_addr, uint16_t uuid) {
  return BT_STATUS_SUCCESS;
}

static bt_status_t connect(RawAddress* bd_addr) {
static bt_status_t connect(const RawAddress* bd_addr) {
  BTIF_TRACE_EVENT("HFP Client version is  %s", btif_hf_client_version);
  CHECK_BTHF_CLIENT_INIT();
  return btif_queue_connect(UUID_SERVCLASS_HF_HANDSFREE, bd_addr, connect_int);
+1 −1
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ typedef struct {
  bt_status_t (*init)(bthf_client_callbacks_t* callbacks);

  /** connect to audio gateway */
  bt_status_t (*connect)(RawAddress* bd_addr);
  bt_status_t (*connect)(const RawAddress* bd_addr);

  /** disconnect from audio gateway */
  bt_status_t (*disconnect)(const RawAddress* bd_addr);