Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be865572 authored by Chris Manton's avatar Chris Manton
Browse files

Final removal of gd_hci_enabled flag

Bug: 197150934
Tag: #refactor
Test: gd/cert/run

Change-Id: Iae71b711949adf3d9b4f9a3c9cd4aa11c178baed
parent 7fb87371
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ flatbuffers::Offset<bluetooth::common::InitFlagsData> bluetooth::dumpsys::InitFl
  builder.add_gd_scanning_enabled(bluetooth::common::init_flags::gd_scanning_is_enabled());
  builder.add_gd_security_enabled(bluetooth::common::init_flags::gd_security_is_enabled());
  builder.add_gd_acl_enabled(bluetooth::common::init_flags::gd_acl_is_enabled());
  builder.add_gd_hci_enabled(bluetooth::common::init_flags::gd_hci_is_enabled());
  builder.add_gd_hci_enabled(true);
  builder.add_gd_controller_enabled(bluetooth::common::init_flags::gd_controller_is_enabled());
  builder.add_gd_core_enabled(bluetooth::common::init_flags::gd_core_is_enabled());
  builder.add_btaa_hci_log_enabled(bluetooth::common::init_flags::btaa_hci_is_enabled());
+1 −3
Original line number Diff line number Diff line
@@ -3,9 +3,7 @@ use paste::paste;
use std::sync::Mutex;

/// Deprecated immutable flag
pub fn gd_hci_is_enabled() -> bool {
    true
}
/// NONE at this time

macro_rules! init_flags {
    (flags: { $($flag:ident),* }, dependencies: { $($parent:ident => $child:ident),* }) => {
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ mod ffi {
        fn gd_scanning_is_enabled() -> bool;
        fn gd_acl_is_enabled() -> bool;
        fn gd_l2cap_is_enabled() -> bool;
        fn gd_hci_is_enabled() -> bool;
        fn gd_controller_is_enabled() -> bool;
        fn gatt_robust_caching_is_enabled() -> bool;
        fn btaa_hci_is_enabled() -> bool;
+0 −1
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ pub fn stack_stop(stack: &mut Stack) {

pub fn get_hci(stack: &mut Stack) -> Box<Hci> {
    assert!(init_flags::gd_rust_is_enabled());
    assert!(init_flags::gd_hci_is_enabled());

    Box::new(Hci::new(
        stack.get_runtime(),
+1 −3
Original line number Diff line number Diff line
@@ -167,9 +167,7 @@ static bool event_already_registered_in_hci_layer(
    case bluetooth::hci::EventCode::PAGE_SCAN_REPETITION_MODE_CHANGE:
    case bluetooth::hci::EventCode::MAX_SLOTS_CHANGE:
    case bluetooth::hci::EventCode::LE_META_EVENT:
      return bluetooth::common::init_flags::gd_hci_is_enabled() ||
             bluetooth::shim::is_gd_acl_enabled() ||
             bluetooth::shim::is_gd_l2cap_enabled();
      return true;
    case bluetooth::hci::EventCode::DISCONNECTION_COMPLETE:
    case bluetooth::hci::EventCode::READ_REMOTE_VERSION_INFORMATION_COMPLETE:
      return bluetooth::shim::is_gd_acl_enabled() ||
Loading