X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=btif%2Fsrc%2Fbtif_dm.c;fp=btif%2Fsrc%2Fbtif_dm.c;h=cbc57efdf24b500de83fa0e4e1999dd16377cdc0;hb=f4cb73aeb0878b7b49c7e60298ec004150cc3b91;hp=36346c912a53088e45a46080287858245917774c;hpb=d129b9430042a81c20cb21ad54657695b77dfb9e;p=android-x86%2Fsystem-bt.git diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 36346c912..cbc57efdf 100644 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -1187,10 +1187,8 @@ static void btif_dm_auth_cmpl_evt (tBTA_DM_AUTH_CMPL *p_auth_cmpl) } else { - /* Trigger SDP on the device */ - pairing_cb.sdp_attempts = 1;; - #if BLE_INCLUDED == TRUE + BOOLEAN is_crosskey = FALSE; /* If bonded due to cross-key, save the static address too*/ if(pairing_cb.state == BT_BOND_STATE_BONDING && (bdcmp(p_auth_cmpl->bd_addr, pairing_cb.bd_addr) != 0)) @@ -1198,13 +1196,21 @@ static void btif_dm_auth_cmpl_evt (tBTA_DM_AUTH_CMPL *p_auth_cmpl) BTIF_TRACE_DEBUG("%s: bonding initiated due to cross key, adding static address", __func__); bdcpy(pairing_cb.static_bdaddr.address, p_auth_cmpl->bd_addr); + is_crosskey = TRUE; } + if (!is_crosskey || !(stack_config_get_interface()->get_pts_crosskey_sdp_disable())) + { #endif - // Ensure inquiry is stopped before attempting service discovery - btif_dm_cancel_discovery(); + // Ensure inquiry is stopped before attempting service discovery + btif_dm_cancel_discovery(); - btif_dm_get_remote_services(&bd_addr); + /* Trigger SDP on the device */ + pairing_cb.sdp_attempts = 1; + btif_dm_get_remote_services(&bd_addr); +#if BLE_INCLUDED == TRUE + } +#endif } // Do not call bond_state_changed_cb yet. Wait until remote service discovery is complete }