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
diff --git a/system/gd/hci/cert/le_advertising_manager_test.py b/system/gd/hci/cert/le_advertising_manager_test.py
index 0ad1a92..64975bb 100644
--- a/system/gd/hci/cert/le_advertising_manager_test.py
+++ b/system/gd/hci/cert/le_advertising_manager_test.py
@@ -76,13 +76,10 @@
             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)
diff --git a/system/gd/hci/cert/le_scanning_manager_test.py b/system/gd/hci/cert/le_scanning_manager_test.py
index b40770a..4ea9b99 100644
--- a/system/gd/hci/cert/le_scanning_manager_test.py
+++ b/system/gd/hci/cert/le_scanning_manager_test.py
@@ -81,13 +81,10 @@
             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)
diff --git a/system/gd/hci/facade/le_advertising_manager_facade.cc b/system/gd/hci/facade/le_advertising_manager_facade.cc
index bfba5da..cda2100 100644
--- a/system/gd/hci/facade/le_advertising_manager_facade.cc
+++ b/system/gd/hci/facade/le_advertising_manager_facade.cc
@@ -59,8 +59,6 @@
     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;
diff --git a/system/gd/hci/facade/le_advertising_manager_facade.proto b/system/gd/hci/facade/le_advertising_manager_facade.proto
index 9c75bd9..daefea6 100644
--- a/system/gd/hci/facade/le_advertising_manager_facade.proto
+++ b/system/gd/hci/facade/le_advertising_manager_facade.proto
@@ -34,7 +34,6 @@
 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
diff --git a/system/gd/hci/le_advertising_manager.h b/system/gd/hci/le_advertising_manager.h
index d410dec..48fa16a 100644
--- a/system/gd/hci/le_advertising_manager.h
+++ b/system/gd/hci/le_advertising_manager.h
@@ -27,7 +27,6 @@
  public:
   std::vector<GapData> advertisement;
   std::vector<GapData> scan_response;
-  Address random_address;
   uint16_t interval_min;
   uint16_t interval_max;
   AdvertisingEventType event_type;
diff --git a/system/gd/l2cap/le/cert/dual_l2cap_test.py b/system/gd/l2cap/le/cert/dual_l2cap_test.py
index dced199..c8bde93 100644
--- a/system/gd/l2cap/le/cert/dual_l2cap_test.py
+++ b/system/gd/l2cap/le/cert/dual_l2cap_test.py
@@ -87,13 +87,10 @@
         gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
         config = le_advertising_facade.AdvertisingConfig(
             advertisement=[gap_data],
-            random_address=self.dut_le_address.address,
             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'00:00:00:00:00:00')),
             channel_map=7,
             filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
         request = le_advertising_facade.CreateAdvertiserRequest(config=config)
diff --git a/system/gd/l2cap/le/cert/le_l2cap_test.py b/system/gd/l2cap/le/cert/le_l2cap_test.py
index 810a10c..96e6348 100644
--- a/system/gd/l2cap/le/cert/le_l2cap_test.py
+++ b/system/gd/l2cap/le/cert/le_l2cap_test.py
@@ -75,13 +75,10 @@
         gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
         config = le_advertising_facade.AdvertisingConfig(
             advertisement=[gap_data],
-            random_address=self.dut_address.address,
             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_ADDRESS,
-            peer_address=common.BluetoothAddress(address=bytes(b'00:00:00:00:00:00')),
             channel_map=7,
             filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
         request = le_advertising_facade.CreateAdvertiserRequest(config=config)
@@ -102,13 +99,10 @@
         gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
         config = le_advertising_facade.AdvertisingConfig(
             advertisement=[gap_data],
-            random_address=self.cert_address.address,
             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_ADDRESS,
-            peer_address=common.BluetoothAddress(address=bytes(b'00:00:00:00:00:00')),
             channel_map=7,
             filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
         request = le_advertising_facade.CreateAdvertiserRequest(config=config)
diff --git a/system/gd/security/cert/le_security_test.py b/system/gd/security/cert/le_security_test.py
index d2738a2..8790284 100644
--- a/system/gd/security/cert/le_security_test.py
+++ b/system/gd/security/cert/le_security_test.py
@@ -86,13 +86,10 @@
         gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
         config = le_advertising_facade.AdvertisingConfig(
             advertisement=[gap_data],
-            random_address=self.cert_address.address,
             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_ADDRESS,
-            peer_address=common.BluetoothAddress(address=bytes(b'00:00:00:00:00:00')),
             channel_map=7,
             filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
         request = le_advertising_facade.CreateAdvertiserRequest(config=config)
@@ -106,13 +103,10 @@
         gap_data = le_advertising_facade.GapDataMsg(data=bytes(gap_name.Serialize()))
         config = le_advertising_facade.AdvertisingConfig(
             advertisement=[gap_data],
-            random_address=self.dut_address.address,
             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_ADDRESS,
-            peer_address=common.BluetoothAddress(address=bytes(b'00:00:00:00:00:00')),
             channel_map=7,
             filter_policy=le_advertising_facade.AdvertisingFilterPolicy.ALL_DEVICES)
         request = le_advertising_facade.CreateAdvertiserRequest(config=config)