Loading system/btif/src/btif_config.cc +1 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ static const storage_config_t interface = { }; static const storage_config_t* storage_config_get_interface() { if (bluetooth::shim::is_gd_shim_enabled()) { if (bluetooth::shim::is_gd_stack_started_up()) { return bluetooth::shim::storage_config_get_interface(); } else { return &interface; Loading system/main/shim/shim.cc +5 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ static bluetooth::common::MessageLoopThread bt_shim_thread("bt_shim_thread"); static bool gd_shim_enabled_ = false; static bool gd_shim_property_checked_ = false; static bool gd_stack_started_up_ = false; future_t* ShimModuleStartUp() { bt_shim_thread.StartUp(); Loading @@ -37,10 +38,12 @@ future_t* ShimModuleStartUp() { << "Unable to start bt shim message loop thread."; module_start_up(get_module(GD_SHIM_BTM_MODULE)); bluetooth::shim::StartGabeldorscheStack(); gd_stack_started_up_ = true; return kReturnImmediate; } future_t* ShimModuleShutDown() { gd_stack_started_up_ = false; bluetooth::shim::StopGabeldorscheStack(); module_shut_down(get_module(GD_SHIM_BTM_MODULE)); bt_shim_thread.ShutDown(); Loading @@ -66,3 +69,5 @@ bool bluetooth::shim::is_gd_shim_enabled() { } return gd_shim_enabled_; } bool bluetooth::shim::is_gd_stack_started_up() { return gd_stack_started_up_; } system/main/shim/shim.h +7 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,13 @@ namespace shim { */ bool is_gd_shim_enabled(); /** * Checks if the bluetooth gd stack has been started up. * * @return true if bluetooth gd stack is started, false otherwise. */ bool is_gd_stack_started_up(); /** * Posts a task on the shim message queue. * Loading Loading
system/btif/src/btif_config.cc +1 −1 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ static const storage_config_t interface = { }; static const storage_config_t* storage_config_get_interface() { if (bluetooth::shim::is_gd_shim_enabled()) { if (bluetooth::shim::is_gd_stack_started_up()) { return bluetooth::shim::storage_config_get_interface(); } else { return &interface; Loading
system/main/shim/shim.cc +5 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ static bluetooth::common::MessageLoopThread bt_shim_thread("bt_shim_thread"); static bool gd_shim_enabled_ = false; static bool gd_shim_property_checked_ = false; static bool gd_stack_started_up_ = false; future_t* ShimModuleStartUp() { bt_shim_thread.StartUp(); Loading @@ -37,10 +38,12 @@ future_t* ShimModuleStartUp() { << "Unable to start bt shim message loop thread."; module_start_up(get_module(GD_SHIM_BTM_MODULE)); bluetooth::shim::StartGabeldorscheStack(); gd_stack_started_up_ = true; return kReturnImmediate; } future_t* ShimModuleShutDown() { gd_stack_started_up_ = false; bluetooth::shim::StopGabeldorscheStack(); module_shut_down(get_module(GD_SHIM_BTM_MODULE)); bt_shim_thread.ShutDown(); Loading @@ -66,3 +69,5 @@ bool bluetooth::shim::is_gd_shim_enabled() { } return gd_shim_enabled_; } bool bluetooth::shim::is_gd_stack_started_up() { return gd_stack_started_up_; }
system/main/shim/shim.h +7 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,13 @@ namespace shim { */ bool is_gd_shim_enabled(); /** * Checks if the bluetooth gd stack has been started up. * * @return true if bluetooth gd stack is started, false otherwise. */ bool is_gd_stack_started_up(); /** * Posts a task on the shim message queue. * Loading