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

Commit 6c7145ab authored by Chienyuan's avatar Chienyuan
Browse files

gd: Prevent set privacy policy twice

Tag: #gd-refactor
Bug: 169125803
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: Ie41c2519818edff3061d77c4df1e126f976fa0c2
parent 858d2c39
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ class BleAdvertiserInterfaceImpl : public BleAdvertiserInterface,
    // Register callback
    bluetooth::shim::GetAdvertising()->RegisterAdvertisingCallback(this);

    if (!bluetooth::common::init_flags::gd_security_is_enabled()) {
    if (!bluetooth::common::init_flags::gd_security_is_enabled() &&
        !bluetooth::common::init_flags::gd_acl_is_enabled()) {
      // Set private policy
      auto address = bluetooth::shim::GetController()->GetMacAddress();
      bluetooth::hci::AddressWithType address_with_type(