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

Commit f5368cd5 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

bluetooth: remove warnings

am: 90fc2748

Change-Id: Ia9ddb703658dc9da438b6b5bc94c97c1f932e0ec
parents 3b2e8921 90fc2748
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -22,23 +22,6 @@
#include <fcntl.h>
#include <utils/Log.h>

namespace {

const size_t preamble_size_for_type[] = {
    0, HCI_COMMAND_PREAMBLE_SIZE, HCI_ACL_PREAMBLE_SIZE, HCI_SCO_PREAMBLE_SIZE,
    HCI_EVENT_PREAMBLE_SIZE};
const size_t packet_length_offset_for_type[] = {
    0, HCI_LENGTH_OFFSET_CMD, HCI_LENGTH_OFFSET_ACL, HCI_LENGTH_OFFSET_SCO,
    HCI_LENGTH_OFFSET_EVT};

size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) {
  size_t offset = packet_length_offset_for_type[type];
  if (type != HCI_PACKET_TYPE_ACL_DATA) return preamble[offset];
  return (((preamble[offset + 1]) << 8) | preamble[offset]);
}

}  // namespace

namespace android {
namespace hardware {
namespace bluetooth {
+0 −3
Original line number Diff line number Diff line
@@ -41,11 +41,8 @@ using hci::MctProtocol;

static char sample_data1[100] = "A point is that which has no part.";
static char sample_data2[100] = "A line is breadthless length.";
static char sample_data3[100] = "The ends of a line are points.";
static char acl_data[100] =
    "A straight line is a line which lies evenly with the points on itself.";
static char sco_data[100] =
    "A surface is that which has length and breadth only.";
static char event_data[100] = "The edges of a surface are lines.";

MATCHER_P3(HidlVecMatches, preamble, preamble_length, payload, "") {