OSDN Git Service

Allow BT inquiry while discovery is in progress.
authortturney <tturney@google.com>
Tue, 8 Sep 2015 21:42:09 +0000 (14:42 -0700)
committertturney <tturney@google.com>
Tue, 8 Sep 2015 21:42:09 +0000 (14:42 -0700)
BT Inquiry is disallowed when service discovery
is in progress. Innitially when GATT discovery
is in progress (crosskey pairing), it resulted
in inquiry requests being rejected. During an
insecure connection like OPP, bonding link key
is not stored. In an earlier patch (b820aec7),
BR/EDR discovery was bypassed if the bonding was
temporary. However, this was not done for LE.
Applying the same logic to LE, resolved the
inquiry issue reported in this bug.

Bug: 23468169
Change-Id: I6111c80a420aeb0bc36a0393eb215c112512d251

btif/src/btif_dm.c

index dcee736..425af22 100644 (file)
@@ -2915,9 +2915,9 @@ static void btif_dm_ble_auth_cmpl_evt (tBTA_DM_AUTH_CMPL *p_auth_cmpl)
             state = BT_BOND_STATE_NONE;
         } else {
             btif_dm_save_ble_bonding_keys();
+            BTA_GATTC_Refresh(bd_addr.address);
+            btif_dm_get_remote_services_by_transport(&bd_addr, BTA_GATT_TRANSPORT_LE);
         }
-        BTA_GATTC_Refresh(bd_addr.address);
-        btif_dm_get_remote_services_by_transport(&bd_addr, BTA_GATT_TRANSPORT_LE);
     }
     else
     {