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

Commit 02979f32 authored by Chienyuan's avatar Chienyuan
Browse files

RootCanal: remove EventPacketBuilder

* create hci event packet by hci_packets.pdl
* use hci::Address and hci::ClassOfDevice

Bug: 140386699
Test: run_cert.sh
Change-Id: I0aa028d797fe1525508bfd9229027eed17ef47e1
parent 2cabb2dd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -332,6 +332,14 @@ cc_benchmark {
    ],
}

filegroup {
    name: "BluetoothHciClassSources",
    srcs: [
        "hci/address.cc",
        "hci/class_of_device.cc",
        ],
}

genrule {
    name: "BluetoothGeneratedPackets_h",
    tools: [
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ cc_binary {
    ],
    generated_headers: [
        "RootCanalGeneratedPackets_h",
        "BluetoothGeneratedPackets_h",
    ],
    static_libs: [
        "android.hardware.bluetooth-async",
@@ -84,6 +85,7 @@ cc_library_shared {
    ],
    generated_headers: [
        "RootCanalGeneratedPackets_h",
        "BluetoothGeneratedPackets_h",
    ],
    static_libs: [
        "android.hardware.bluetooth-async",
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ cc_library_static {
        "model/setup/test_command_handler.cc",
        "model/setup/test_model.cc",
        ":BluetoothPacketSources",
        ":BluetoothHciClassSources",
    ],
    cflags: [
        "-fvisibility=hidden",
@@ -50,6 +51,7 @@ cc_library_static {
    ],
    generated_headers: [
        "RootCanalGeneratedPackets_h",
        "BluetoothGeneratedPackets_h",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
@@ -126,6 +128,7 @@ cc_test_host {
    ],
    generated_headers: [
        "RootCanalGeneratedPackets_h",
        "BluetoothGeneratedPackets_h",
    ],
    shared_libs: [
        "liblog",
+3 −1
Original line number Diff line number Diff line
@@ -18,10 +18,12 @@

#include <cstdint>

#include "types/address.h"
#include "hci/address.h"

namespace test_vendor_lib {

using ::bluetooth::hci::Address;

// Model the connection of a device to the controller.
class AclConnection {
 public:
+3 −1
Original line number Diff line number Diff line
@@ -18,12 +18,14 @@

#include "os/log.h"

#include "types/address.h"
#include "hci/address.h"

using std::shared_ptr;

namespace test_vendor_lib {

using ::bluetooth::hci::Address;

bool AclConnectionHandler::HasHandle(uint16_t handle) const {
  if (acl_connections_.count(handle) == 0) {
    return false;
Loading