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

Commit 64b823ef authored by Myles Watson's avatar Myles Watson
Browse files

LeAdvertisingManager: Remove random address

Since we have an address manager, we don't set the
advertising address in the advertisement anymore.

Tag: #gd-refactor
Bug: 152346341
Test: gd/cert/run --host
Change-Id: I0c606d0ea4362e11f38ee664b4094046a98405e4
parent 593d18f1
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -76,13 +76,10 @@ class LeAdvertisingManagerTest(GdBaseTestClass):
            gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
            config = le_advertising_facade.AdvertisingConfig(
                advertisement=[gap_data],
                random_address=common.BluetoothAddress(address=bytes(b'0D:05:04:03:02:01')),
                interval_min=512,
                interval_max=768,
                event_type=le_advertising_facade.AdvertisingEventType.ADV_IND,
                address_type=common.RANDOM_DEVICE_ADDRESS,
                peer_address_type=common.PUBLIC_DEVICE_OR_IDENTITY_ADDRESS,
                peer_address=common.BluetoothAddress(address=bytes(b'A6:A5:A4:A3:A2:A1')),
                channel_map=7,
                filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
            request = le_advertising_facade.CreateAdvertiserRequest(config=config)
+0 −3
Original line number Diff line number Diff line
@@ -81,13 +81,10 @@ class LeScanningManagerTest(GdBaseTestClass):
            gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
            config = le_advertising_facade.AdvertisingConfig(
                advertisement=[gap_data],
                random_address=common.BluetoothAddress(address=bytes(b'A6:A5:A4:A3:A2:A1')),
                interval_min=512,
                interval_max=768,
                event_type=le_advertising_facade.AdvertisingEventType.ADV_IND,
                address_type=common.RANDOM_DEVICE_ADDRESS,
                peer_address_type=common.PUBLIC_DEVICE_OR_IDENTITY_ADDRESS,
                peer_address=common.BluetoothAddress(address=bytes(b'0C:05:04:03:02:01')),
                channel_map=7,
                filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
            request = le_advertising_facade.CreateAdvertiserRequest(config=config)
+0 −2
Original line number Diff line number Diff line
@@ -59,8 +59,6 @@ bool AdvertisingConfigFromProto(const AdvertisingConfig& config_proto, hci::Adve
    config->scan_response.push_back(GapDataFromProto(elem));
  }

  hci::Address::FromString(config_proto.random_address().address(), config->random_address);

  if (config_proto.interval_min() > UINT16_MAX || config_proto.interval_min() < 0) {
    LOG_WARN("Bad interval_min: %d", config_proto.interval_min());
    return false;
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ enum AdvertisingFilterPolicy {
message AdvertisingConfig {
  repeated GapDataMsg advertisement = 1;
  repeated GapDataMsg scan_response = 2;
  bluetooth.facade.BluetoothAddress random_address = 3;
  // Unit: number of Bluetooth slots in 0.125 ms increment
  int32 interval_min = 4;
  // Unit: number of Bluetooth slots in 0.125 ms increment
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ class AdvertisingConfig {
 public:
  std::vector<GapData> advertisement;
  std::vector<GapData> scan_response;
  Address random_address;
  uint16_t interval_min;
  uint16_t interval_max;
  AdvertisingEventType event_type;
Loading