Loading system/gd/Android.bp +14 −0 Original line number Diff line number Diff line Loading @@ -114,11 +114,17 @@ cc_defaults { srcs: [ ":BluetoothOsSources_linux_generic", ], shared_libs: [ "libprotobuf-cpp-full", ], }, host: { srcs: [ ":BluetoothHalSources_hci_rootcanal", ], shared_libs: [ "libprotobuf-cpp-full", ], }, android: { srcs: [ Loading Loading @@ -153,6 +159,9 @@ cc_defaults { "libchrome", "libcrypto", ], static_libs: [ "libbluetooth-protos", ] } cc_library { Loading Loading @@ -205,6 +214,7 @@ cc_binary { ], static_libs: [ "libbluetooth_gd", "libbluetooth-protos", ], shared_libs: [ "libchrome", Loading Loading @@ -279,12 +289,14 @@ cc_test { "BluetoothGeneratedPackets_h", ], static_libs: [ "libbluetooth-protos", "libbluetooth_gd", "libgmock", ], shared_libs: [ "libchrome", "libcrypto", "libprotobuf-cpp-full", ], sanitize: { address: true, Loading Loading @@ -320,6 +332,7 @@ cc_defaults { ":BluetoothHciFuzzHelperSources", ], static_libs: [ "libbluetooth-protos", "libbluetooth_gd_fuzzing", "libchrome", "libgmock", Loading @@ -331,6 +344,7 @@ cc_defaults { ], shared_libs: [ "libcrypto", "libprotobuf-cpp-full", ], cflags: [ "-DFUZZ_TARGET", Loading system/gd/module.cc +7 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ #include "module.h" #include "bluetooth/dumpmod.pb.h" using ::bluetooth::os::Handler; using ::bluetooth::os::Thread; Loading Loading @@ -126,6 +127,8 @@ os::Handler* ModuleRegistry::GetModuleHandler(const ModuleFactory* module) const } void ModuleDumper::DumpState() const { Dumpmod dumpmod; for (auto it = module_registry_.start_order_.rbegin(); it != module_registry_.start_order_.rend(); it++) { auto instance = module_registry_.started_modules_.find(*it); ASSERT(instance != module_registry_.started_modules_.end()); Loading @@ -133,7 +136,10 @@ void ModuleDumper::DumpState() const { if (message == nullptr) { continue; } // TODO(cmanton) Process module message into master proto ModuleDumpState dump_state; dump_state.set_name(instance->second->ToString()); dump_state.mutable_data()->PackFrom(*message); dumpmod.mutable_module_dump_states()->insert({dump_state.name(), dump_state}); } } Loading system/gd/proto/Android.bp +5 −0 Original line number Diff line number Diff line Loading @@ -22,10 +22,15 @@ cc_library_static { host_supported: true, proto: { export_proto_headers: true, type: "lite", include_dirs: ["external/protobuf/src"], }, srcs: [ "bluetooth/dumpmod.proto", "bluetooth/metrics/bluetooth.proto" ], apex_available: [ "//apex_available:platform", "com.android.bluetooth.updatable", ], } Loading
system/gd/Android.bp +14 −0 Original line number Diff line number Diff line Loading @@ -114,11 +114,17 @@ cc_defaults { srcs: [ ":BluetoothOsSources_linux_generic", ], shared_libs: [ "libprotobuf-cpp-full", ], }, host: { srcs: [ ":BluetoothHalSources_hci_rootcanal", ], shared_libs: [ "libprotobuf-cpp-full", ], }, android: { srcs: [ Loading Loading @@ -153,6 +159,9 @@ cc_defaults { "libchrome", "libcrypto", ], static_libs: [ "libbluetooth-protos", ] } cc_library { Loading Loading @@ -205,6 +214,7 @@ cc_binary { ], static_libs: [ "libbluetooth_gd", "libbluetooth-protos", ], shared_libs: [ "libchrome", Loading Loading @@ -279,12 +289,14 @@ cc_test { "BluetoothGeneratedPackets_h", ], static_libs: [ "libbluetooth-protos", "libbluetooth_gd", "libgmock", ], shared_libs: [ "libchrome", "libcrypto", "libprotobuf-cpp-full", ], sanitize: { address: true, Loading Loading @@ -320,6 +332,7 @@ cc_defaults { ":BluetoothHciFuzzHelperSources", ], static_libs: [ "libbluetooth-protos", "libbluetooth_gd_fuzzing", "libchrome", "libgmock", Loading @@ -331,6 +344,7 @@ cc_defaults { ], shared_libs: [ "libcrypto", "libprotobuf-cpp-full", ], cflags: [ "-DFUZZ_TARGET", Loading
system/gd/module.cc +7 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ #include "module.h" #include "bluetooth/dumpmod.pb.h" using ::bluetooth::os::Handler; using ::bluetooth::os::Thread; Loading Loading @@ -126,6 +127,8 @@ os::Handler* ModuleRegistry::GetModuleHandler(const ModuleFactory* module) const } void ModuleDumper::DumpState() const { Dumpmod dumpmod; for (auto it = module_registry_.start_order_.rbegin(); it != module_registry_.start_order_.rend(); it++) { auto instance = module_registry_.started_modules_.find(*it); ASSERT(instance != module_registry_.started_modules_.end()); Loading @@ -133,7 +136,10 @@ void ModuleDumper::DumpState() const { if (message == nullptr) { continue; } // TODO(cmanton) Process module message into master proto ModuleDumpState dump_state; dump_state.set_name(instance->second->ToString()); dump_state.mutable_data()->PackFrom(*message); dumpmod.mutable_module_dump_states()->insert({dump_state.name(), dump_state}); } } Loading
system/gd/proto/Android.bp +5 −0 Original line number Diff line number Diff line Loading @@ -22,10 +22,15 @@ cc_library_static { host_supported: true, proto: { export_proto_headers: true, type: "lite", include_dirs: ["external/protobuf/src"], }, srcs: [ "bluetooth/dumpmod.proto", "bluetooth/metrics/bluetooth.proto" ], apex_available: [ "//apex_available:platform", "com.android.bluetooth.updatable", ], }