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

Commit f98e235a authored by Zhengping Jiang's avatar Zhengping Jiang Committed by Gerrit Code Review
Browse files

Merge "floss: add sysprop to adjust LE scan parameters during system suspend" into main

parents b4aa5edd 01827bcd
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ static const std::string kPropertyConnScanWindow2mFast = "bluetooth.core.le.conn
static const std::string kPropertyConnScanWindowCodedFast = "bluetooth.core.le.connection_scan_window_coded_fast";
static const std::string kPropertyConnScanIntervalSlow = "bluetooth.core.le.connection_scan_interval_slow";
static const std::string kPropertyConnScanWindowSlow = "bluetooth.core.le.connection_scan_window_slow";
static const std::string kPropertyConnScanIntervalSystemSuspend =
    "bluetooth.core.le.connection_scan_interval_system_suspend";
static const std::string kPropertyConnScanWindowSystemSuspend =
    "bluetooth.core.le.connection_scan_window_system_suspend";
static const std::string kPropertyEnableBlePrivacy = "bluetooth.core.gap.le.privacy.enabled";
static const std::string kPropertyEnableBleOnlyInit1mPhy = "bluetooth.core.gap.le.conn.only_init_1m_phy.enabled";

@@ -829,8 +833,10 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
    }
    // Use specific parameters when in system suspend.
    if (system_suspend_) {
      le_scan_interval = kScanIntervalSystemSuspend;
      le_scan_window = kScanWindowSystemSuspend;
      le_scan_interval = os::GetSystemPropertyUint32(
          kPropertyConnScanIntervalSystemSuspend, kScanIntervalSystemSuspend);
      le_scan_window = os::GetSystemPropertyUint32(
          kPropertyConnScanWindowSystemSuspend, kScanWindowSystemSuspend);
      le_scan_window_2m = le_scan_window;
      le_scan_window_coded = le_scan_window;
    }
+2 −0
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ void SyspropsModule::parse_config(std::string file_path) {
      "bluetooth.core.le.connection_scan_window_coded_fast",
      "bluetooth.core.le.connection_scan_interval_slow",
      "bluetooth.core.le.connection_scan_window_slow",
      "bluetooth.core.le.connection_scan_interval_system_suspend",
      "bluetooth.core.le.connection_scan_window_system_suspend",
      "bluetooth.core.le.inquiry_scan_interval",
      "bluetooth.core.le.inquiry_scan_window",
      "bluetooth.core.le.adv_mon_scan_interval",