Loading system/bta/dm/bta_dm_act.cc +15 −5 Original line number Diff line number Diff line Loading @@ -312,8 +312,12 @@ void bta_dm_disable() { /* disable all active subsystems */ bta_sys_disable(); BTM_SetDiscoverability(BTM_NON_DISCOVERABLE); BTM_SetConnectability(BTM_NON_CONNECTABLE); if (BTM_SetDiscoverability(BTM_NON_DISCOVERABLE) != BTM_SUCCESS) { log::warn("Unable to clear discoverability"); } if (BTM_SetConnectability(BTM_NON_CONNECTABLE) != BTM_SUCCESS) { log::warn("Unable to clear connectability"); } bta_dm_disable_pm(); if (com::android::bluetooth::flags::separate_service_and_device_discovery()) { Loading Loading @@ -436,8 +440,12 @@ bool BTA_DmSetVisibility(bt_scan_mode_t mode) { return false; } BTM_SetDiscoverability(disc_mode_param); BTM_SetConnectability(conn_mode_param); if (BTM_SetDiscoverability(disc_mode_param) != BTM_SUCCESS) { log::warn("Unable to set discoveability"); } if (BTM_SetConnectability(conn_mode_param) != BTM_SUCCESS) { log::warn("Unable to set connectability"); } return true; } void bta_dm_process_remove_device_no_callback(const RawAddress& bd_addr) { Loading Loading @@ -1592,7 +1600,9 @@ void bta_dm_allow_wake_by_hid( // If there are any entries in the classic hid list, we should also make // the adapter connectable for classic. if (classic_hid_devices.size() > 0) { BTM_SetConnectability(BTA_DM_CONN); if (BTM_SetConnectability(BTA_DM_CONN) != BTM_SUCCESS) { log::warn("Unable to set connectability"); } } bluetooth::shim::BTM_AllowWakeByHid(std::move(classic_hid_devices), Loading system/stack/btm/btm_devctl.cc +9 −4 Original line number Diff line number Diff line Loading @@ -297,10 +297,15 @@ static void decode_controller_support() { btm_sec_dev_reset(); if (bluetooth::shim::GetController()->SupportsRssiWithInquiryResults()) { if (bluetooth::shim::GetController()->SupportsExtendedInquiryResponse()) BTM_SetInquiryMode(BTM_INQ_RESULT_EXTENDED); else BTM_SetInquiryMode(BTM_INQ_RESULT_WITH_RSSI); if (bluetooth::shim::GetController()->SupportsExtendedInquiryResponse()) { if (BTM_SetInquiryMode(BTM_INQ_RESULT_EXTENDED) != BTM_SUCCESS) { log::warn("Unable to set inquiry mode BTM_INQ_RESULT_EXTENDED"); } } else { if (BTM_SetInquiryMode(BTM_INQ_RESULT_WITH_RSSI) != BTM_SUCCESS) { log::warn("Unable to set inquiry mode BTM_INQ_RESULT_WITH_RSSI"); } } } l2cu_set_non_flushable_pbf( Loading Loading
system/bta/dm/bta_dm_act.cc +15 −5 Original line number Diff line number Diff line Loading @@ -312,8 +312,12 @@ void bta_dm_disable() { /* disable all active subsystems */ bta_sys_disable(); BTM_SetDiscoverability(BTM_NON_DISCOVERABLE); BTM_SetConnectability(BTM_NON_CONNECTABLE); if (BTM_SetDiscoverability(BTM_NON_DISCOVERABLE) != BTM_SUCCESS) { log::warn("Unable to clear discoverability"); } if (BTM_SetConnectability(BTM_NON_CONNECTABLE) != BTM_SUCCESS) { log::warn("Unable to clear connectability"); } bta_dm_disable_pm(); if (com::android::bluetooth::flags::separate_service_and_device_discovery()) { Loading Loading @@ -436,8 +440,12 @@ bool BTA_DmSetVisibility(bt_scan_mode_t mode) { return false; } BTM_SetDiscoverability(disc_mode_param); BTM_SetConnectability(conn_mode_param); if (BTM_SetDiscoverability(disc_mode_param) != BTM_SUCCESS) { log::warn("Unable to set discoveability"); } if (BTM_SetConnectability(conn_mode_param) != BTM_SUCCESS) { log::warn("Unable to set connectability"); } return true; } void bta_dm_process_remove_device_no_callback(const RawAddress& bd_addr) { Loading Loading @@ -1592,7 +1600,9 @@ void bta_dm_allow_wake_by_hid( // If there are any entries in the classic hid list, we should also make // the adapter connectable for classic. if (classic_hid_devices.size() > 0) { BTM_SetConnectability(BTA_DM_CONN); if (BTM_SetConnectability(BTA_DM_CONN) != BTM_SUCCESS) { log::warn("Unable to set connectability"); } } bluetooth::shim::BTM_AllowWakeByHid(std::move(classic_hid_devices), Loading
system/stack/btm/btm_devctl.cc +9 −4 Original line number Diff line number Diff line Loading @@ -297,10 +297,15 @@ static void decode_controller_support() { btm_sec_dev_reset(); if (bluetooth::shim::GetController()->SupportsRssiWithInquiryResults()) { if (bluetooth::shim::GetController()->SupportsExtendedInquiryResponse()) BTM_SetInquiryMode(BTM_INQ_RESULT_EXTENDED); else BTM_SetInquiryMode(BTM_INQ_RESULT_WITH_RSSI); if (bluetooth::shim::GetController()->SupportsExtendedInquiryResponse()) { if (BTM_SetInquiryMode(BTM_INQ_RESULT_EXTENDED) != BTM_SUCCESS) { log::warn("Unable to set inquiry mode BTM_INQ_RESULT_EXTENDED"); } } else { if (BTM_SetInquiryMode(BTM_INQ_RESULT_WITH_RSSI) != BTM_SUCCESS) { log::warn("Unable to set inquiry mode BTM_INQ_RESULT_WITH_RSSI"); } } } l2cu_set_non_flushable_pbf( Loading