Re-log stack/btm/btm_ble_gap::btm_ble_update_mode_operation
Towards loggable code
Bug: 163134718
Tag: #refactor
Test: gd/cert/run
Change-Id: I0b04060b0fa827f1ae0499858eac115fba12034c
diff --git a/system/stack/btm/btm_ble_gap.cc b/system/stack/btm/btm_ble_gap.cc
index 37e71f4..a838a6d 100644
--- a/system/stack/btm/btm_ble_gap.cc
+++ b/system/stack/btm/btm_ble_gap.cc
@@ -47,6 +47,7 @@
#include "stack/include/bt_types.h"
#include "stack/include/btm_api_types.h"
#include "stack/include/gap_api.h"
+#include "stack/include/hci_error_code.h"
#include "stack/include/hcimsgs.h"
#include "stack/include/inq_hci_link_interface.h"
#include "types/raw_address.h"
@@ -2491,7 +2492,9 @@
/* in case of disconnected, we must cancel bgconn and restart
in order to add back device to acceptlist in order to reconnect */
- if (bd_addr) btm_ble_bgconn_cancel_if_disconnected(*bd_addr);
+ if (bd_addr != nullptr) {
+ btm_ble_bgconn_cancel_if_disconnected(*bd_addr);
+ }
/* when no connection is attempted, and controller is not rejecting last
request
@@ -2501,6 +2504,7 @@
if (btm_cb.ble_ctr_cb.is_connection_state_idle() &&
status != HCI_ERR_HOST_REJECT_RESOURCES &&
status != HCI_ERR_MAX_NUM_OF_CONNECTIONS) {
+ LOG_DEBUG("Resuming le background connections");
btm_ble_resume_bg_conn();
}
}