summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jack He <siyuanh@google.com> 2025-01-10 19:14:41 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-01-10 19:14:41 -0800
commita93c7a18582734cffa52181baa7aa91801593b61 (patch)
tree18fb16b57a3bba965d5fd4206f0ed920c228a8ff
parent9515f86f67d40eef74cdb07e8b0ad885d4360149 (diff)
parent0b4968df43c83ccef03df33c031cf1f2c1dc9291 (diff)
Merge "Replace the flag le_enc_on_reconnection with the flag le_enc_on_reconnect" into main am: 72aef4ad52 am: 0b4968df43
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/3446008 Change-Id: Ie5c3b15046a206ea5a50f91a888b9b4d488d32ba Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--flags/security.aconfig4
-rw-r--r--system/stack/btm/btm_ble_sec.cc2
-rw-r--r--system/stack/btm/btm_sec.cc4
3 files changed, 5 insertions, 5 deletions
diff --git a/flags/security.aconfig b/flags/security.aconfig
index 809689c2d4..dc6fea1ac5 100644
--- a/flags/security.aconfig
+++ b/flags/security.aconfig
@@ -36,10 +36,10 @@ flag {
}
flag {
- name: "le_enc_on_reconnection"
+ name: "le_enc_on_reconnect"
namespace: "bluetooth"
description: "Encrypt LE link on reconnection with bonded devices"
- bug: "356201480"
+ bug: "388864535"
metadata {
purpose: PURPOSE_BUGFIX
}
diff --git a/system/stack/btm/btm_ble_sec.cc b/system/stack/btm/btm_ble_sec.cc
index 2ab87a0573..e05091f656 100644
--- a/system/stack/btm/btm_ble_sec.cc
+++ b/system/stack/btm/btm_ble_sec.cc
@@ -1595,7 +1595,7 @@ void btm_ble_connection_established(const RawAddress& bda) {
}
// Encrypt the link if device is bonded
- if (com::android::bluetooth::flags::le_enc_on_reconnection() &&
+ if (com::android::bluetooth::flags::le_enc_on_reconnect() &&
p_dev_rec->sec_rec.is_le_link_key_known()) {
btm_ble_set_encryption(bda, BTM_BLE_SEC_ENCRYPT,
p_dev_rec->role_central ? HCI_ROLE_CENTRAL : HCI_ROLE_PERIPHERAL);
diff --git a/system/stack/btm/btm_sec.cc b/system/stack/btm/btm_sec.cc
index 6783fc48ed..5251baa7eb 100644
--- a/system/stack/btm/btm_sec.cc
+++ b/system/stack/btm/btm_sec.cc
@@ -1029,7 +1029,7 @@ tBTM_STATUS BTM_SetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport
: p_dev_rec->sec_rec.classic_link;
/* Enqueue security request if security is active */
- if (!com::android::bluetooth::flags::le_enc_on_reconnection()) {
+ if (!com::android::bluetooth::flags::le_enc_on_reconnect()) {
if (p_dev_rec->sec_rec.p_callback ||
(p_dev_rec->sec_rec.le_link != tSECURITY_STATE::IDLE &&
p_dev_rec->sec_rec.classic_link != tSECURITY_STATE::IDLE)) {
@@ -4993,7 +4993,7 @@ static void btm_sec_check_pending_enc_req(tBTM_SEC_DEV_REC* p_dev_rec, tBT_TRANS
node = list_next(node);
log::debug("btm_sec_check_pending_enc_req : sec_act=0x{:x}", p_e->sec_act);
if (p_e->bd_addr == p_dev_rec->bd_addr && p_e->psm == 0 && p_e->transport == transport) {
- if (!com::android::bluetooth::flags::le_enc_on_reconnection()) {
+ if (!com::android::bluetooth::flags::le_enc_on_reconnect()) {
if (encr_enable == 0 || transport == BT_TRANSPORT_BR_EDR ||
p_e->sec_act == BTM_BLE_SEC_ENCRYPT || p_e->sec_act == BTM_BLE_SEC_ENCRYPT_NO_MITM ||
(p_e->sec_act == BTM_BLE_SEC_ENCRYPT_MITM &&