Loading system/stack/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,7 @@ cc_fuzz { ], static_libs: [ "bluetooth_flags_c_lib", "libaconfig_storage_read_api_cc", "libbluetooth-types", "libbluetooth_crypto_toolbox", "libbluetooth_hci_pdl", Loading Loading @@ -904,6 +905,7 @@ cc_test { "libcutils", ], static_libs: [ "libaconfig_storage_read_api_cc", "libbase", "libbluetooth-types", "libbluetooth_crypto_toolbox", Loading @@ -924,6 +926,7 @@ cc_test { "libosi", "libprotobuf-cpp-lite", "libstatslog_bt", "server_configurable_flags", ], target: { android: { Loading system/stack/rfcomm/rfc_port_fsm.cc +12 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ ******************************************************************************/ #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <cstdint> #include <cstring> Loading Loading @@ -568,6 +569,17 @@ void rfc_port_sm_disc_wait_ua(tPORT* p_port, tRFC_PORT_EVENT event, void* p_data case RFC_PORT_EVENT_DM: log::warn("RFC_EVENT_DM|RFC_EVENT_UA[{}], index={}", event, p_port->handle); if (com::android::bluetooth::flags::rfcomm_always_disc_initiator_in_disc_wait_ua()) { // If we got a DM in RFC_STATE_DISC_WAIT_UA, it's likely that both ends // attempt to DISC at the same time and both get a DM. // Without setting this flag the both ends would start the same timers, // wait, and still DISC the multiplexer at the same time eventually. // The wait is meaningless and would block all other services that rely // on RFCOMM such as HFP. // Thus, setting this flag here to save us a timeout and doesn't // introduce further RFCOMM event changes. p_port->rfc.p_mcb->is_disc_initiator = true; } rfc_port_closed(p_port); return; Loading Loading
system/stack/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,7 @@ cc_fuzz { ], static_libs: [ "bluetooth_flags_c_lib", "libaconfig_storage_read_api_cc", "libbluetooth-types", "libbluetooth_crypto_toolbox", "libbluetooth_hci_pdl", Loading Loading @@ -904,6 +905,7 @@ cc_test { "libcutils", ], static_libs: [ "libaconfig_storage_read_api_cc", "libbase", "libbluetooth-types", "libbluetooth_crypto_toolbox", Loading @@ -924,6 +926,7 @@ cc_test { "libosi", "libprotobuf-cpp-lite", "libstatslog_bt", "server_configurable_flags", ], target: { android: { Loading
system/stack/rfcomm/rfc_port_fsm.cc +12 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ ******************************************************************************/ #include <bluetooth/log.h> #include <com_android_bluetooth_flags.h> #include <cstdint> #include <cstring> Loading Loading @@ -568,6 +569,17 @@ void rfc_port_sm_disc_wait_ua(tPORT* p_port, tRFC_PORT_EVENT event, void* p_data case RFC_PORT_EVENT_DM: log::warn("RFC_EVENT_DM|RFC_EVENT_UA[{}], index={}", event, p_port->handle); if (com::android::bluetooth::flags::rfcomm_always_disc_initiator_in_disc_wait_ua()) { // If we got a DM in RFC_STATE_DISC_WAIT_UA, it's likely that both ends // attempt to DISC at the same time and both get a DM. // Without setting this flag the both ends would start the same timers, // wait, and still DISC the multiplexer at the same time eventually. // The wait is meaningless and would block all other services that rely // on RFCOMM such as HFP. // Thus, setting this flag here to save us a timeout and doesn't // introduce further RFCOMM event changes. p_port->rfc.p_mcb->is_disc_initiator = true; } rfc_port_closed(p_port); return; Loading