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

Commit c5cdc004 authored by Myles Watson's avatar Myles Watson Committed by android-build-merger
Browse files

Merge "Bluetooth: Check H4 HCI packet types" am: dcc6f25d am: 526b1dcb am: d11c986c

am: 17344146

Change-Id: Iee0f576c0f55a7f213be4f89827f5b147ba655f3
parents 700eb12f 17344146
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -82,6 +82,12 @@ void H4Protocol::OnDataReady(int fd) {
      }
    }
    hci_packet_type_ = static_cast<HciPacketType>(buffer[0]);
    if (hci_packet_type_ != HCI_PACKET_TYPE_ACL_DATA &&
        hci_packet_type_ != HCI_PACKET_TYPE_SCO_DATA &&
        hci_packet_type_ != HCI_PACKET_TYPE_EVENT) {
      LOG_ALWAYS_FATAL("%s: Unimplemented packet type %d", __func__,
                       static_cast<int>(hci_packet_type_));
    }
  } else {
    hci_packetizer_.OnDataReady(fd, hci_packet_type_);
  }