namespace bluetooth {
namespace common {
+const std::string kGdAclFlag = "INIT_gd_acl";
+bool InitFlags::gd_acl_enabled = false;
+
const std::string kGdHciFlag = "INIT_gd_hci";
bool InitFlags::gd_hci_enabled = false;
while (flags != nullptr && *flags != nullptr) {
if (kGdCoreFlag == *flags) {
gd_core_enabled = true;
+ } else if (kGdAclFlag == *flags) {
+ gd_acl_enabled = true;
} else if (kGdHciFlag == *flags) {
gd_hci_enabled = true;
} else if (kGdControllerFlag == *flags) {
flags++;
}
- if (gd_core_enabled && !gd_controller_enabled) {
+ if (gd_core_enabled && !gd_acl_enabled) {
+ gd_acl_enabled = true;
+ }
+ if (gd_acl_enabled && !gd_controller_enabled) {
gd_controller_enabled = true;
}
if (gd_controller_enabled && !gd_hci_enabled) {
}
LOG_INFO(
- "Flags loaded: gd_hci_enabled: %s, gd_controller_enabled: %s, gd_core_enabled: %s",
+ "Flags loaded: gd_acl_enabled: %s, gd_hci_enabled: %s, gd_controller_enabled: %s, gd_core_enabled: %s",
+ gd_acl_enabled ? "true" : "false",
gd_hci_enabled ? "true" : "false",
gd_controller_enabled ? "true" : "false",
gd_core_enabled ? "true" : "false");
void InitFlags::SetAll(bool value) {
gd_core_enabled = value;
+ gd_acl_enabled = value;
gd_controller_enabled = value;
gd_hci_enabled = value;
gatt_robust_caching_enabled = value;
table InitFlagsData {
title:string;
+ gd_acl_enabled:bool;
gd_hci_enabled:bool;
gd_controller_enabled:bool;
gd_core_enabled:bool;
public:
static void Load(const char** flags);
+ static bool GdAclEnabled() {
+ return gd_acl_enabled;
+ }
+
static bool GdHciEnabled() {
return gd_hci_enabled;
}
private:
static void SetAll(bool value);
+ static bool gd_acl_enabled;
static bool gd_hci_enabled;
static bool gd_controller_enabled;
static bool gd_core_enabled;
auto title = fb_builder->CreateString("----- Init Flags -----");
common::InitFlagsDataBuilder builder(*fb_builder);
builder.add_title(title);
+ builder.add_gd_acl_enabled(bluetooth::common::InitFlags::GdAclEnabled());
builder.add_gd_hci_enabled(bluetooth::common::InitFlags::GdHciEnabled());
builder.add_gd_controller_enabled(bluetooth::common::InitFlags::GdControllerEnabled());
builder.add_gd_core_enabled(bluetooth::common::InitFlags::GdCoreEnabled());
.clean_up = kUnusedModuleApi,
.dependencies = {kUnusedModuleDependencies}};
+bool bluetooth::shim::is_gd_acl_enabled() {
+ return bluetooth::common::InitFlags::GdAclEnabled();
+}
+
bool bluetooth::shim::is_gd_hci_enabled() {
return bluetooth::common::InitFlags::GdHciEnabled();
}
*
* @return true if using gd shim core, false if using legacy.
*/
+bool is_gd_acl_enabled();
bool is_gd_hci_enabled();
bool is_gd_controller_enabled();
bool is_gd_shim_enabled();
if (common::InitFlags::GdControllerEnabled()) {
modules.add<hci::Controller>();
}
+ if (common::InitFlags::GdAclEnabled()) {
+ modules.add<hci::AclManager>();
+ }
if (common::InitFlags::GdCoreEnabled()) {
modules.add<att::AttModule>();
- modules.add<hci::AclManager>();
modules.add<hci::LeAdvertisingManager>();
modules.add<hci::LeScanningManager>();
modules.add<l2cap::classic::L2capClassicModule>();