Loading sysprop/ble.sysprop +8 −0 Original line number Diff line number Diff line Loading @@ -24,3 +24,11 @@ prop { access: Readonly prop_name: "bluetooth.ble.random_address_rotation_interval_max" } prop { api_name: "allow_enc_with_bredr" type: Boolean scope: Internal access: Readonly prop_name: "bluetooth.ble.allow_enc_with_bredr" } system/stack/btm/btm_ble_sec.cc +11 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include "stack/btm/btm_ble_sec.h" #include <android_bluetooth_sysprop.h> #include <base/strings/stringprintf.h> #include <bluetooth/log.h> Loading Loading @@ -1234,8 +1235,16 @@ tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk, return BTM_WRONG_MODE; } if (p_rec->sec_rec.is_security_state_encrypting()) { log::warn("Link Encryption is active, Busy!"); if (p_rec->sec_rec.is_security_state_le_encrypting()) { log::warn("LE link encryption is active, Busy!"); return BTM_BUSY; } // Some controllers may not like encrypting both transports at the same time bool allow_le_enc_with_bredr = GET_SYSPROP(Ble, allow_enc_with_bredr, false); if (!allow_le_enc_with_bredr && p_rec->sec_rec.is_security_state_bredr_encrypting()) { log::warn("BR/EDR link encryption is active, Busy!"); return BTM_BUSY; } Loading Loading
sysprop/ble.sysprop +8 −0 Original line number Diff line number Diff line Loading @@ -24,3 +24,11 @@ prop { access: Readonly prop_name: "bluetooth.ble.random_address_rotation_interval_max" } prop { api_name: "allow_enc_with_bredr" type: Boolean scope: Internal access: Readonly prop_name: "bluetooth.ble.allow_enc_with_bredr" }
system/stack/btm/btm_ble_sec.cc +11 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include "stack/btm/btm_ble_sec.h" #include <android_bluetooth_sysprop.h> #include <base/strings/stringprintf.h> #include <bluetooth/log.h> Loading Loading @@ -1234,8 +1235,16 @@ tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk, return BTM_WRONG_MODE; } if (p_rec->sec_rec.is_security_state_encrypting()) { log::warn("Link Encryption is active, Busy!"); if (p_rec->sec_rec.is_security_state_le_encrypting()) { log::warn("LE link encryption is active, Busy!"); return BTM_BUSY; } // Some controllers may not like encrypting both transports at the same time bool allow_le_enc_with_bredr = GET_SYSPROP(Ble, allow_enc_with_bredr, false); if (!allow_le_enc_with_bredr && p_rec->sec_rec.is_security_state_bredr_encrypting()) { log::warn("BR/EDR link encryption is active, Busy!"); return BTM_BUSY; } Loading