summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbalakrishna <quic_kunthumu@quicinc.com>2023-03-06 17:15:03 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2023-03-22 19:14:54 -0700
commit51016bfcae593c68809a16f2a8a27ec80da20fc2 (patch)
tree43d2aa5c8df7bdbb4902831a780a43f9d4efe36c
parent11cc96aff6e1cea761ba5527780267bf2a846f4c (diff)
BT: Not allow inquiry, until pairing complete
Root cause: SDP search is queued as expected. But, before SDP finish customer app triggered inquiry again. Hence inquiry queued in state machine. As queue mechanism here is state machine driven, its queue only latest event. Hence inquiry queued finally and executing. Fix: We should not allow inquiry, until we complete the pairing. Change-Id: I65f2569dcedc87b6f39f49b4cfab297f2658717b
-rw-r--r--btif/src/btif_dm.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/btif/src/btif_dm.cc b/btif/src/btif_dm.cc
index 3f210f0d6..095baba19 100644
--- a/btif/src/btif_dm.cc
+++ b/btif/src/btif_dm.cc
@@ -2820,7 +2820,7 @@ bt_status_t btif_dm_start_discovery(void) {
BTIF_TRACE_EVENT("%s : pairing_cb.state: 0x%x", __FUNCTION__, pairing_cb.state);
/* We should not go for inquiry in BONDING STATE. */
- if (pairing_cb.state == BT_BOND_STATE_BONDING)
+ if (is_bonding_or_sdp())
return BT_STATUS_BUSY;
#ifdef ADV_AUDIO_FEATURE
if (bta_lea_is_le_pairing()){