From cf1603ebaca00c8262feb0901cd481ca03d8c035 Mon Sep 17 00:00:00 2001 From: Martin Brabham Date: Fri, 4 Oct 2019 07:38:29 -0700 Subject: [PATCH] Revert "Confirm the presence of BT key when BT ON" This reverts commit bd8c5865c9991dd318c7ac47263b527ad7a4cd9b. Bug: 139930706 Test: Manual Change-Id: Ie80622782563bd38ee3421e7d3585ebd112482bf (cherry picked from commit ae055008f4cc8e0a06dd9cf7a473d94b1c2bbcfd) --- btif/include/btif_keystore.h | 8 -------- btif/src/btif_config.cc | 4 +--- btif/src/btif_keystore.cc | 4 ---- 3 files changed, 1 insertion(+), 15 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_client_; std::mutex api_mutex_; diff --git a/btif/src/btif_config.cc b/btif/src/btif_config.cc index ed24d7dde..be006abd4 100644 --- a/btif/src/btif_config.cc +++ b/btif/src/btif_config.cc @@ -183,9 +183,7 @@ static BtifKeystore btif_keystore(new keystore::KeystoreClientImpl); static future_t* init(void) { std::unique_lock lock(config_lock); - if (is_factory_reset() || - (use_key_attestation() && !btif_keystore.DoesKeyExist())) - delete_config_files(); + if (is_factory_reset()) delete_config_files(); std::string file_source; 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 -- 2.11.0