diff options
Diffstat (limited to 'btif')
-rw-r--r-- | btif/include/btif_keystore.h | 8 | ||||
-rw-r--r-- | btif/src/btif_dm.cc | 17 | ||||
-rw-r--r-- | btif/src/btif_keystore.cc | 4 |
3 files changed, 4 insertions, 25 deletions
diff --git a/btif/include/btif_keystore.h b/btif/include/btif_keystore.h index cc06a9826..4762350f8 100644 --- a/btif/include/btif_keystore.h +++ b/btif/include/btif_keystore.h @@ -59,14 +59,6 @@ class BtifKeystore { */ std::string Decrypt(const std::string& input_filename); - /** - * Check for existence of keystore key. - * - * This key can be cleared if a user manually wipes bluetooth storage data - * b/133214365 - */ - bool DoesKeyExist(); - private: std::unique_ptr<keystore::KeystoreClient> keystore_client_; std::mutex api_mutex_; diff --git a/btif/src/btif_dm.cc b/btif/src/btif_dm.cc index a450c274c..554398875 100644 --- a/btif/src/btif_dm.cc +++ b/btif/src/btif_dm.cc @@ -973,21 +973,12 @@ static void btif_dm_ssp_cfm_req_evt(tBTA_DM_SP_CFM_REQ* p_ssp_cfm_req) { /* If JustWorks auto-accept */ if (p_ssp_cfm_req->just_works) { - /* Pairing consent for JustWorks needed if: - * 1. Incoming (non-temporary) pairing is detected AND - * 2. local IO capabilities are DisplayYesNo AND - * 3. remote IO capabiltiies are DisplayOnly or NoInputNoOutput; + /* Pairing consent for JustWorks NOT needed if: + * 1. Incoming temporary pairing is detected */ - if (is_incoming && pairing_cb.bond_type != BOND_TYPE_TEMPORARY && - ((p_ssp_cfm_req->loc_io_caps == HCI_IO_CAP_DISPLAY_YESNO) && - (p_ssp_cfm_req->rmt_io_caps == HCI_IO_CAP_DISPLAY_ONLY || - p_ssp_cfm_req->rmt_io_caps == HCI_IO_CAP_NO_IO))) { + if (is_incoming && pairing_cb.bond_type == BOND_TYPE_TEMPORARY) { BTIF_TRACE_EVENT( - "%s: User consent needed for incoming pairing request. loc_io_caps: " - "%d, rmt_io_caps: %d", - __func__, p_ssp_cfm_req->loc_io_caps, p_ssp_cfm_req->rmt_io_caps); - } else { - BTIF_TRACE_EVENT("%s: Auto-accept JustWorks pairing", __func__); + "%s: Auto-accept JustWorks pairing for temporary incoming", __func__); btif_dm_ssp_reply(&bd_addr, BT_SSP_VARIANT_CONSENT, true, 0); return; } diff --git a/btif/src/btif_keystore.cc b/btif/src/btif_keystore.cc index 0af03e11b..fe9d3ddb7 100644 --- a/btif/src/btif_keystore.cc +++ b/btif/src/btif_keystore.cc @@ -98,8 +98,4 @@ KeyStoreNativeReturnCode BtifKeystore::GenerateKey(const std::string& name, &software_enforced_characteristics); } -bool BtifKeystore::DoesKeyExist() { - return keystore_client_->doesKeyExist(kKeyStore); -} - } // namespace bluetooth |