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

Commit b193b6ec authored by Jack He's avatar Jack He
Browse files

[GD ACL] Make ACL packets non-flushable by default

* So that enhanced flush command does not discard pending ACL packets
that may be one of those A2DP commands

Bug: 177278022
Bug: 178752129
Test: gd/cert/run
Tag: #gd-refactor
Change-Id: Ibf168d0a022c8ef93058e0e986566b40c808e003
parent 36794110
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -127,9 +127,8 @@ void RoundRobinScheduler::buffer_packet(std::map<uint16_t, acl_queue_handler>::i

  ConnectionType connection_type = acl_queue_handler->second.connection_type_;
  size_t mtu = connection_type == ConnectionType::CLASSIC ? hci_mtu_ : le_hci_mtu_;
  PacketBoundaryFlag packet_boundary_flag =
      (connection_type == ConnectionType::CLASSIC ? PacketBoundaryFlag::FIRST_AUTOMATICALLY_FLUSHABLE
                                                  : PacketBoundaryFlag::FIRST_NON_AUTOMATICALLY_FLUSHABLE);
  // TODO(b/178752129): Make A2DP and Hearing Aid audio packets flushable
  PacketBoundaryFlag packet_boundary_flag = PacketBoundaryFlag::FIRST_NON_AUTOMATICALLY_FLUSHABLE;
  int acl_priority = acl_queue_handler->second.high_priority_ ? 1 : 0;
  if (packet->size() <= mtu) {
    fragments_to_send_.push(