Merge "Use GD Controller for SupportsBle in btm_sec" into main am: c9d9b7e9bc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2955786
Change-Id: I431692de440b9a9c1e775e4703e026fd42b695d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/system/stack/btm/btm_sec.cc b/system/stack/btm/btm_sec.cc
index ed37a5b..b7e0d02 100644
--- a/system/stack/btm/btm_sec.cc
+++ b/system/stack/btm/btm_sec.cc
@@ -3429,10 +3429,12 @@
uint8_t encr_enable) {
if (status != HCI_SUCCESS || encr_enable == 0 ||
BTM_IsBleConnection(handle) ||
- !controller_get_interface()->supports_read_encryption_key_size() ||
+ !bluetooth::shim::GetController()->IsSupported(
+ bluetooth::hci::OpCode::READ_ENCRYPTION_KEY_SIZE) ||
// Skip encryption key size check when using set_min_encryption_key_size
(bluetooth::common::init_flags::set_min_encryption_is_enabled() &&
- controller_get_interface()->supports_set_min_encryption_key_size())) {
+ bluetooth::shim::GetController()->IsSupported(
+ bluetooth::hci::OpCode::SET_MIN_ENCRYPTION_KEY_SIZE))) {
if (status == HCI_ERR_CONNECTION_TOUT) {
smp_cancel_start_encryption_attempt();
return;
@@ -3972,7 +3974,8 @@
tHCI_STATUS status) {
if (status != HCI_SUCCESS || BTM_IsBleConnection(handle) ||
// Skip encryption key size check when using set_min_encryption_key_size
- controller_get_interface()->supports_set_min_encryption_key_size()) {
+ bluetooth::shim::GetController()->IsSupported(
+ bluetooth::hci::OpCode::SET_MIN_ENCRYPTION_KEY_SIZE)) {
btm_sec_encrypt_change(handle, static_cast<tHCI_STATUS>(status),
(status == HCI_SUCCESS) ? 1 : 0);
} else {