Loading system/gd/Android.bp +0 −9 Original line number Diff line number Diff line cc_defaults { name: "gd_defaults", include_dirs: ["external/protobuf/src"], target: { android: { test_config_template: "AndroidTestTemplate.xml", Loading Loading @@ -114,18 +113,12 @@ cc_defaults { srcs: [ ":BluetoothOsSources_linux_generic", ], shared_libs: [ "libprotobuf-cpp-full", ], }, host: { srcs: [ ":BluetoothHalSources_hci_rootcanal", ":BluetoothOsSources_host", ], shared_libs: [ "libprotobuf-cpp-full", ], }, android: { srcs: [ Loading Loading @@ -304,7 +297,6 @@ cc_test { shared_libs: [ "libchrome", "libcrypto", "libprotobuf-cpp-full", ], sanitize: { address: true, Loading Loading @@ -352,7 +344,6 @@ cc_defaults { ], shared_libs: [ "libcrypto", "libprotobuf-cpp-full", ], cflags: [ "-DFUZZ_TARGET", Loading system/gd/module.cc +0 −22 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ #include "module.h" #include "bluetooth/dumpmod.pb.h" using ::bluetooth::os::Handler; using ::bluetooth::os::Thread; Loading @@ -27,10 +26,6 @@ constexpr std::chrono::milliseconds kModuleStopTimeout = std::chrono::millisecon ModuleFactory::ModuleFactory(std::function<Module*()> ctor) : ctor_(ctor) { } std::unique_ptr<google::protobuf::Message> Module::DumpState() const { return nullptr; } std::string Module::ToString() const { return "Module"; } Loading Loading @@ -126,21 +121,4 @@ os::Handler* ModuleRegistry::GetModuleHandler(const ModuleFactory* module) const return nullptr; } 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()); std::unique_ptr<google::protobuf::Message> message = instance->second->DumpState(); if (message == nullptr) { continue; } 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}); } } } // namespace bluetooth system/gd/module.h +1 −6 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ #pragma once #include <google/protobuf/message.h> #include <functional> #include <future> #include <map> Loading Loading @@ -86,9 +85,6 @@ class Module { // Release all resources, you're about to be deleted virtual void Stop() = 0; // Get relevant state data from the module virtual std::unique_ptr<google::protobuf::Message> DumpState() const; virtual std::string ToString() const; ::bluetooth::os::Handler* GetHandler() const; Loading Loading @@ -158,10 +154,9 @@ class ModuleRegistry { class ModuleDumper { public: ModuleDumper(ModuleRegistry& module_registry) : module_registry_(module_registry) {} void DumpState() const; private: ModuleRegistry& module_registry_; [[maybe_unused]] ModuleRegistry& module_registry_; }; class TestModuleRegistry : public ModuleRegistry { Loading Loading
system/gd/Android.bp +0 −9 Original line number Diff line number Diff line cc_defaults { name: "gd_defaults", include_dirs: ["external/protobuf/src"], target: { android: { test_config_template: "AndroidTestTemplate.xml", Loading Loading @@ -114,18 +113,12 @@ cc_defaults { srcs: [ ":BluetoothOsSources_linux_generic", ], shared_libs: [ "libprotobuf-cpp-full", ], }, host: { srcs: [ ":BluetoothHalSources_hci_rootcanal", ":BluetoothOsSources_host", ], shared_libs: [ "libprotobuf-cpp-full", ], }, android: { srcs: [ Loading Loading @@ -304,7 +297,6 @@ cc_test { shared_libs: [ "libchrome", "libcrypto", "libprotobuf-cpp-full", ], sanitize: { address: true, Loading Loading @@ -352,7 +344,6 @@ cc_defaults { ], shared_libs: [ "libcrypto", "libprotobuf-cpp-full", ], cflags: [ "-DFUZZ_TARGET", Loading
system/gd/module.cc +0 −22 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ */ #include "module.h" #include "bluetooth/dumpmod.pb.h" using ::bluetooth::os::Handler; using ::bluetooth::os::Thread; Loading @@ -27,10 +26,6 @@ constexpr std::chrono::milliseconds kModuleStopTimeout = std::chrono::millisecon ModuleFactory::ModuleFactory(std::function<Module*()> ctor) : ctor_(ctor) { } std::unique_ptr<google::protobuf::Message> Module::DumpState() const { return nullptr; } std::string Module::ToString() const { return "Module"; } Loading Loading @@ -126,21 +121,4 @@ os::Handler* ModuleRegistry::GetModuleHandler(const ModuleFactory* module) const return nullptr; } 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()); std::unique_ptr<google::protobuf::Message> message = instance->second->DumpState(); if (message == nullptr) { continue; } 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}); } } } // namespace bluetooth
system/gd/module.h +1 −6 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ #pragma once #include <google/protobuf/message.h> #include <functional> #include <future> #include <map> Loading Loading @@ -86,9 +85,6 @@ class Module { // Release all resources, you're about to be deleted virtual void Stop() = 0; // Get relevant state data from the module virtual std::unique_ptr<google::protobuf::Message> DumpState() const; virtual std::string ToString() const; ::bluetooth::os::Handler* GetHandler() const; Loading Loading @@ -158,10 +154,9 @@ class ModuleRegistry { class ModuleDumper { public: ModuleDumper(ModuleRegistry& module_registry) : module_registry_(module_registry) {} void DumpState() const; private: ModuleRegistry& module_registry_; [[maybe_unused]] ModuleRegistry& module_registry_; }; class TestModuleRegistry : public ModuleRegistry { Loading