From 04c45382988247e04d50f8599c5e4501e0934553 Mon Sep 17 00:00:00 2001 From: Hemant Gupta Date: Tue, 24 Dec 2013 19:59:57 +0530 Subject: [PATCH] Bluetooth: GAP: Send bond none in case of temp pairing Send BOND_NONE in case of temporary device pairing on receiving the authentication complete, so that UI doesn't get stucked in pairing for that device. Change-Id: Ided412ef89d928f958a0052362be145232411c0a --- btif/src/btif_dm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index cd75b3e02..feed04ba8 100644 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -847,6 +847,13 @@ static void btif_dm_auth_cmpl_evt (tBTA_DM_AUTH_CMPL *p_auth_cmpl) { BTIF_TRACE_DEBUG3("%s: Temporary key. Not storing. key_type=0x%x, is_temp=%d", __FUNCTION__, p_auth_cmpl->key_type, pairing_cb.is_temp); + if(pairing_cb.is_temp) + { + BTIF_TRACE_DEBUG1("%s: sending BT_BOND_STATE_NONE for Temp pairing", + __FUNCTION__); + bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_NONE); + return; + } } } if (p_auth_cmpl->success) -- 2.11.0