Merge "Bluetooth: Check H4 HCI packet types" am: dcc6f25d05

am: 526b1dcb99

Change-Id: Icb9c51b2e3db718d60c4e5300db5b27c28882178
This commit is contained in:
Myles Watson 2017-08-24 23:46:45 +00:00 committed by android-build-merger
commit d11c986c40

View file

@ -81,6 +81,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_);
}