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

Commit 95f68955 authored by Katherine Lai's avatar Katherine Lai
Browse files

Create new sysprops module

New module loads sysprops defaults from config file and merges
config fragments from the corresponding .d directory if it exists.

This allows non-Android OS's to use sysprops and gives them a way
to set and override sysprop defaults.

Also migrates bluetooth.core.gap.le.privacy.enabled on Linux to
use the new module.

Bug: 233119381
Bug: 233119695
Tag: #floss
Test: Unit tests and manually verified privacy sysprop
Change-Id: I7167f6fdfa9ec2ec3c1504b8b44f92c5ae2ba174
parent 6d039306
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -1584,7 +1584,6 @@ void BTIF_dm_enable() {
    ble_privacy_enabled = false;
  }
#endif

  LOG_INFO("%s BLE Privacy: %d", __func__, ble_privacy_enabled);
  BTA_DmBleConfigLocalPrivacy(ble_privacy_enabled);

+4 −0
Original line number Diff line number Diff line
@@ -188,6 +188,7 @@ cc_defaults {
        ":BluetoothShimSources",
        ":BluetoothSecuritySources",
        ":BluetoothStorageSources",
        ":BluetoothSyspropsSources",
    ],
    generated_headers: [
        "BluetoothGeneratedBundlerSchema_h_bfbs",
@@ -199,6 +200,9 @@ cc_defaults {
        "libcrypto",
        "libflatbuffers-cpp",
    ],
    whole_static_libs: [
        "libc++fs",
    ],
    static_libs: [
        "libbluetooth-dumpsys",
        "libbluetooth-protos",
+1 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ static_library("libbluetooth_gd") {
    "//bt/system/gd/security:BluetoothSecuritySources",
    "//bt/system/gd/shim:BluetoothShimSources",
    "//bt/system/gd/storage:BluetoothStorageSources",
    "//bt/system/gd/sysprops:BluetoothSyspropsSources",
  ]
}

+5 −0
Original line number Diff line number Diff line
@@ -82,6 +82,11 @@ void ParameterProvider::OverrideSnoozLogFilePath(const std::string& path) {
  snooz_log_file_path = path;
}

// Android doesn't have a need for the sysprops module
std::string ParameterProvider::SyspropsFilePath() {
  return "";
}

bluetooth_keystore::BluetoothKeystoreInterface* ParameterProvider::GetBtKeystoreInterface() {
  std::lock_guard<std::mutex> lock(parameter_mutex);
  return bt_keystore_interface;
+4 −0
Original line number Diff line number Diff line
@@ -96,6 +96,10 @@ void ParameterProvider::OverrideSnoozLogFilePath(const std::string& path) {
  snooz_log_file_path = path;
}

std::string ParameterProvider::SyspropsFilePath() {
  return "";
}

bluetooth_keystore::BluetoothKeystoreInterface* ParameterProvider::GetBtKeystoreInterface() {
  return nullptr;
}
Loading