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

Commit 69852d20 authored by Wei-Luan Wang's avatar Wei-Luan Wang Committed by Gerrit Code Review
Browse files

Merge "Migrate LeRandCallback to be base::OnceCallback" into main

parents 8db9f4f3 abfd66a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4519,7 +4519,7 @@ void bta_dm_disconnect_all_acls(void) {
 ******************************************************************************/
void bta_dm_le_rand(LeRandCallback cb) {
  VLOG(1) << "bta_dm_le_rand in bta_dm_act";
  bluetooth::shim::BTM_LeRand(cb);
  bluetooth::shim::BTM_LeRand(std::move(cb));
}

/*******************************************************************************
+1 −1
Original line number Diff line number Diff line
@@ -710,7 +710,7 @@ void BTA_DmClearFilterAcceptList(void) {
 ******************************************************************************/
void BTA_DmLeRand(LeRandCallback cb) {
  APPL_TRACE_API("BTA_DmLeRand");
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_le_rand, cb));
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_le_rand, std::move(cb)));
}

/*******************************************************************************
+1 −1
Original line number Diff line number Diff line
@@ -1341,7 +1341,7 @@ void BTA_DmDisconnectAllAcls(void);
 ******************************************************************************/
void BTA_DmClearFilterAcceptList(void);

using LeRandCallback = base::Callback<void(uint64_t)>;
using LeRandCallback = base::OnceCallback<void(uint64_t)>;
/*******************************************************************************
 *
 * Function         BTA_DmLeRand
+2 −1
Original line number Diff line number Diff line
@@ -738,7 +738,8 @@ static int le_rand() {
  if (!interface_ready()) return BT_STATUS_NOT_READY;

  do_in_main_thread(
      FROM_HERE, base::BindOnce(btif_dm_le_rand, base::Bind(&le_rand_btif_cb)));
      FROM_HERE,
      base::BindOnce(btif_dm_le_rand, base::BindOnce(&le_rand_btif_cb)));
  return BT_STATUS_SUCCESS;
}

+1 −1
Original line number Diff line number Diff line
@@ -4060,7 +4060,7 @@ void btif_dm_disconnect_all_acls() {

void btif_dm_le_rand(LeRandCallback callback) {
  LOG_VERBOSE("%s: called", __func__);
  BTA_DmLeRand(callback);
  BTA_DmLeRand(std::move(callback));
}

void btif_dm_set_event_filter_connection_setup_all_devices() {
Loading