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

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

Ensure remote name callback is sent at cancel

Bug: 331746206
Bug: 333094503
Test: m .
Flag: rnr_reset_state_at_cancel
Change-Id: Ic466c367e7742445e2bc7af9cbae916a4079d921
parent 684636df
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
 *
 ******************************************************************************/

#include <android_bluetooth_flags.h>
#include <bluetooth/log.h>
#include <stddef.h>
#include <stdio.h>
@@ -862,9 +863,14 @@ tBTM_STATUS BTM_CancelRemoteDeviceName(void) {
      /* Cancel remote name request for LE device, and process remote name
       * callback. */
      btm_inq_rmt_name_failed_cancelled();
    } else
    } else {
      bluetooth::shim::ACL_CancelRemoteNameRequest(
          btm_cb.btm_inq_vars.remname_bda);
      if (IS_FLAG_ENABLED(rnr_reset_state_at_cancel)) {
        btm_process_remote_name(&btm_cb.btm_inq_vars.remname_bda, nullptr, 0,
                                HCI_ERR_UNSPECIFIED);
      }
    }
    return (BTM_CMD_STARTED);
  } else
    return (BTM_WRONG_MODE);