summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author William Escande <wescande@google.com> 2024-05-08 10:49:30 -0700
committer William Escande <wescande@google.com> 2024-05-08 10:51:17 -0700
commitd9786bdff44959bbb520b2073a96eb65c50d611a (patch)
tree4a1b3605f1092f74483cad6c2ec550f86ecf9374
parentc97c3d376a42809cff42dedc0bd940f49ca1bfcd (diff)
sysprops_module: do not link for android
The sysprops_module has no purpose on an android device (that has sysprop capabilities from the os). Therefor it make no sens to have the module in gd nor link it. Bug: 307006275 Test: m com.android.btservices Flag: Exempt, dead code removal Change-Id: I6bb09bbcffc4c91bb3bafd2cf85d5789bfb52d48
-rw-r--r--system/gd/Android.bp1
-rw-r--r--system/gd/hci/controller.cc4
-rw-r--r--system/gd/sysprops/sysprops_module.h4
-rw-r--r--system/main/shim/stack.cc4
4 files changed, 12 insertions, 1 deletions
diff --git a/system/gd/Android.bp b/system/gd/Android.bp
index 7fa3a5c1fe..10ec5c0288 100644
--- a/system/gd/Android.bp
+++ b/system/gd/Android.bp
@@ -142,7 +142,6 @@ cc_defaults {
":BluetoothPacketSources",
":BluetoothSecuritySources",
":BluetoothStorageSources",
- ":BluetoothSyspropsSources",
"module.cc",
"module_dumper.cc",
"stack_manager.cc",
diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc
index fa02b175ed..0a690f1e74 100644
--- a/system/gd/hci/controller.cc
+++ b/system/gd/hci/controller.cc
@@ -33,7 +33,9 @@
#include "os/log.h"
#include "os/metrics.h"
#include "os/system_properties.h"
+#if TARGET_FLOSS
#include "sysprops/sysprops_module.h"
+#endif
namespace bluetooth {
namespace hci {
@@ -1537,7 +1539,9 @@ const ModuleFactory Controller::Factory = ModuleFactory([]() { return new Contro
void Controller::ListDependencies(ModuleList* list) const {
list->add<hci::HciLayer>();
+#if TARGET_FLOSS
list->add<sysprops::SyspropsModule>();
+#endif
}
void Controller::Start() {
diff --git a/system/gd/sysprops/sysprops_module.h b/system/gd/sysprops/sysprops_module.h
index c7a72191cd..abeab63991 100644
--- a/system/gd/sysprops/sysprops_module.h
+++ b/system/gd/sysprops/sysprops_module.h
@@ -15,6 +15,10 @@
*/
#pragma once
+#if !defined(TARGET_FLOSS)
+#error "sysprops_module is supposed to be FLOSS specific"
+#endif
+
#include "module.h"
namespace bluetooth {
diff --git a/system/main/shim/stack.cc b/system/main/shim/stack.cc
index 69210377d7..b2edf6a790 100644
--- a/system/main/shim/stack.cc
+++ b/system/main/shim/stack.cc
@@ -51,7 +51,9 @@
#include "os/log.h"
#include "shim/dumpsys.h"
#include "storage/storage_module.h"
+#if TARGET_FLOSS
#include "sysprops/sysprops_module.h"
+#endif
namespace bluetooth {
namespace shim {
@@ -82,7 +84,9 @@ void Stack::StartEverything() {
modules.add<storage::StorageModule>();
modules.add<shim::Dumpsys>();
modules.add<hci::VendorSpecificEventManager>();
+#if TARGET_FLOSS
modules.add<sysprops::SyspropsModule>();
+#endif
modules.add<hci::Controller>();
modules.add<hci::acl_manager::AclScheduler>();