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

Commit 5ff18523 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "gd: Fix LeAclManagerTest fails on real device"

parents 99c44e0b 06b383ec
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -136,12 +136,12 @@ class LeAclManagerTestBase():
                handle = cc_view.GetConnectionHandle()
                address = cc_view.GetPeerAddress()
                return True
            if b'\x3e\x13\x0A\x00' in packet_bytes:
            if b'\x3e\x1f\x0A\x00' in packet_bytes:
                cc_view = hci_packets.LeEnhancedConnectionCompleteView(
                    hci_packets.LeMetaEventView(
                        hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes)))))
                handle = cc_view.GetConnectionHandle()
                address = cc_view.GetPeerResolvablePrivateAddress()
                address = cc_view.GetPeerAddress()
                return True
            return False

@@ -202,6 +202,7 @@ class LeAclManagerTestBase():
    def test_cert_connects(self):
        self.set_privacy_policy_static()
        self.register_for_le_event(hci_packets.SubeventCode.CONNECTION_COMPLETE)
        self.register_for_le_event(hci_packets.SubeventCode.ENHANCED_CONNECTION_COMPLETE)

        self.dut_le_acl_manager.listen_for_incoming_connections()

@@ -253,7 +254,7 @@ class LeAclManagerTestBase():
                        hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes)))))
                handle = cc_view.GetConnectionHandle()
                return True
            if b'\x3e\x13\x0A\x00' in packet_bytes:
            if b'\x3e\x1f\x0A\x00' in packet_bytes:
                cc_view = hci_packets.LeEnhancedConnectionCompleteView(
                    hci_packets.LeMetaEventView(
                        hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet_bytes)))))
+24 −0
Original line number Diff line number Diff line
@@ -96,6 +96,30 @@ bool AdvertisingConfigFromProto(const AdvertisingConfig& config_proto, hci::Exte
  config->tx_power = static_cast<uint8_t>(config_proto.tx_power());

  config->legacy_pdus = true;

  auto advertising_type = static_cast<::bluetooth::hci::AdvertisingType>(config_proto.advertising_type());

  switch (advertising_type) {
    case AdvertisingType::ADV_IND: {
      config->connectable = true;
      config->scannable = true;
    } break;
    case AdvertisingType::ADV_DIRECT_IND: {
      config->connectable = true;
      config->directed = true;
      config->high_duty_directed_connectable = true;
    } break;
    case AdvertisingType::ADV_SCAN_IND: {
      config->scannable = true;
    } break;
    case AdvertisingType::ADV_NONCONN_IND: {
    } break;
    case AdvertisingType::ADV_DIRECT_IND_LOW: {
      config->directed = true;
      config->connectable = true;
    } break;
  }

  return true;
}