Merge cherrypicks of ['googleplex-android-review.googlesource.com/33605659', 'googleplex-android-review.googlesource.com/35039654'] into 25Q2-release. Change-Id: I902dbdaba46fd26a5ceca1c1b0690053d17ee987
diff --git a/flags/pairing.aconfig b/flags/pairing.aconfig index faae7d2..f5b1f3a 100644 --- a/flags/pairing.aconfig +++ b/flags/pairing.aconfig
@@ -72,16 +72,6 @@ } flag { - name: "save_peer_csrk_after_ltk_gen" - namespace: "bluetooth" - description: "save peer csrk after ltk generated so that right security level is marked as part of peer csrk" - bug: "365567905" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { name: "wait_for_lea_disc_on_le_acl_stat" namespace: "bluetooth" description: "Check for LE ACL status before waiting on LEA discovery" @@ -142,16 +132,6 @@ } flag { - name: "bonded_device_smp_failure_handling" - namespace: "bluetooth" - description: "Don't remove bond on SMP failure for bonded devices in peripheral role" - bug: "385181815" - metadata { - purpose: PURPOSE_BUGFIX - } -} - -flag { name: "peripheral_auth_req" namespace: "bluetooth" description: "Use appropriate authentication requirements for SMP security request in peripheral role"
diff --git a/system/stack/btm/btm_ble_sec.cc b/system/stack/btm/btm_ble_sec.cc index 679e937..5ae3a75 100644 --- a/system/stack/btm/btm_ble_sec.cc +++ b/system/stack/btm/btm_ble_sec.cc
@@ -1637,10 +1637,6 @@ static bool btm_ble_complete_evt_ignore(const tBTM_SEC_DEV_REC* p_dev_rec, const tBTM_LE_EVT_DATA* p_data) { - if (!com::android::bluetooth::flags::bonded_device_smp_failure_handling()) { - return false; - } - // Peripheral role: Encryption request results in SMP Security request. SMP may generate a // SMP_COMPLT_EVT failure event cases like below: // 1) Some central devices don't handle cross-over between encryption and SMP security request
diff --git a/system/stack/smp/smp_act.cc b/system/stack/smp/smp_act.cc index cfc696a..b9faeea 100644 --- a/system/stack/smp/smp_act.cc +++ b/system/stack/smp/smp_act.cc
@@ -1099,9 +1099,7 @@ smp_update_key_mask(p_cb, SMP_SEC_KEY_TYPE_CSRK, true); - if (com::android::bluetooth::flags::save_peer_csrk_after_ltk_gen()) { - smp_key_distribution_by_transport(p_cb, NULL); - } + smp_key_distribution_by_transport(p_cb, NULL); /* save CSRK to security record */ tBTM_LE_KEY_VALUE le_key = { @@ -1120,10 +1118,6 @@ if ((p_cb->peer_auth_req & SMP_AUTH_BOND) && (p_cb->loc_auth_req & SMP_AUTH_BOND)) { btm_sec_save_le_key(p_cb->pairing_bda, BTM_LE_KEY_PCSRK, &le_key, true); } - - if (!com::android::bluetooth::flags::save_peer_csrk_after_ltk_gen()) { - smp_key_distribution_by_transport(p_cb, NULL); - } } /*******************************************************************************