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

Commit bfcd4457 authored by Ajay Panicker's avatar Ajay Panicker Committed by Android (Google) Code Review
Browse files

Merge "Implement the JNI layer for the AVRCP Service (2/3)" into pi-dev

parents 4ba95ad5 c12821c7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ btifCommonIncludes = [
    "packages/modules/Bluetooth/system/stack/btm",
    "packages/modules/Bluetooth/system/stack/avdt",
    "packages/modules/Bluetooth/system/udrv/include",
    "packages/modules/Bluetooth/system/btif/avrcp",
    "packages/modules/Bluetooth/system/btif/include",
    "packages/modules/Bluetooth/system/btif/co",
    "packages/modules/Bluetooth/system/hci/include",
@@ -101,12 +102,10 @@ cc_library_static {
        "libhwbinder",
        "libutils",
    ],
    static_libs: [
        "lib-bt-packets",
    ],
    whole_static_libs: [
        "avrcp-target-service",
        "libaudio-a2dp-hw-utils",
        "lib-bt-packets",
    ],
    cflags: ["-DBUILDCFG"],

+6 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#include <hardware/bt_sdp.h>
#include <hardware/bt_sock.h>

#include "avrcp_service.h"
#include "bt_utils.h"
#include "bta/include/bta_hf_client_api.h"
#include "btif_a2dp.h"
@@ -422,6 +423,10 @@ static int config_clear(void) {
  return btif_config_clear() ? BT_STATUS_SUCCESS : BT_STATUS_FAIL;
}

static bluetooth::avrcp::ServiceInterface* get_avrcp_service(void) {
  return bluetooth::avrcp::AvrcpService::GetServiceInterface();
}

EXPORT_SYMBOL bt_interface_t bluetoothInterface = {
    sizeof(bluetoothInterface),
    init,
@@ -456,4 +461,5 @@ EXPORT_SYMBOL bt_interface_t bluetoothInterface = {
    config_clear,
    interop_database_clear,
    interop_database_add,
    get_avrcp_service,
};
+9 −1
Original line number Diff line number Diff line
cc_library_headers {
    name: "avrcp_headers",
    defaults: ["libchrome_support_defaults"],
    include_dirs: ["packages/modules/Bluetooth/system/internal_include"],
    export_include_dirs: ["./hardware/avrcp/"],
    header_libs: ["internal_include_headers"],
    export_header_lib_headers: ["internal_include_headers"],

    // We need this in case some file outside of the Bluetooth project includes
    // bluetooth.h but doesn't include libchrome which avrcp.h depends on.
    export_shared_lib_headers: ["libchrome"],

    vendor_available: true,
    host_supported: true,
}

cc_library_headers {
    name: "libbluetooth_headers",
    defaults: ["libchrome_support_defaults"],
    header_libs: [
        "avrcp_headers",
        "libbluetooth-types-header",
    ],
    export_header_lib_headers: [
        "avrcp_headers",
        "libbluetooth-types-header",
    ],

    export_include_dirs: ["./"],
    vendor_available: true,
    host_supported: true,
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <base/bind.h>

#include "avrcp_common.h"
#include "avrcp_logging_helper.h"
#include "raw_address.h"

namespace bluetooth {
+8 −2
Original line number Diff line number Diff line
@@ -22,8 +22,9 @@
#include <sys/cdefs.h>
#include <sys/types.h>

#include <bluetooth/uuid.h>
#include <raw_address.h>
#include "avrcp/avrcp.h"
#include "bluetooth/uuid.h"
#include "raw_address.h"

/**
 * The Bluetooth Hardware Module ID
@@ -585,6 +586,11 @@ typedef struct {
   */
  void (*interop_database_add)(uint16_t feature, const RawAddress* addr,
                               size_t len);

  /**
   * Get the AvrcpTarget Service interface to interact with the Avrcp Service
   */
  bluetooth::avrcp::ServiceInterface* (*get_avrcp_service)(void);
} bt_interface_t;

#define BLUETOOTH_INTERFACE_STRING "bluetoothInterface"
Loading