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

Commit 724764c8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "AICS: Add native aics module" into main

parents fc23a9d3 5a288596
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ cc_library_shared {
    // is required to maintain FIPS compliance.
    stl: "libc++_static",
    static_libs: [
        "aics",
        "android.hardware.audio.common@5.0",
        "android.hardware.bluetooth.audio@2.0",
        "android.hardware.bluetooth.audio@2.1",
+7 −3
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

#define LOG_TAG "BluetoothVolumeControlServiceJni"

#include <aics/api.h>
#include <bluetooth/log.h>
#include <jni.h>
#include <nativehelper/JNIHelp.h>
@@ -34,9 +35,12 @@
#include "hardware/bt_vc.h"
#include "types/raw_address.h"

using bluetooth::aics::Mute;
using bluetooth::vc::ConnectionState;
using bluetooth::vc::VolumeControlCallbacks;
using bluetooth::vc::VolumeControlInterface;
using bluetooth::vc::VolumeInputStatus;
using bluetooth::vc::VolumeInputType;

namespace android {
static jmethodID method_onConnectionStateChanged;
@@ -218,7 +222,7 @@ public:
  }

  void OnExtAudioInStateChanged(const RawAddress& bd_addr, uint8_t ext_input_id, int8_t gain_val,
                                uint8_t gain_mode, uint8_t mute) override {
                                uint8_t gain_mode, Mute mute) override {
    log::info("");

    std::shared_lock<std::shared_timed_mutex> lock(callbacks_mutex);
@@ -241,7 +245,7 @@ public:
  }

  void OnExtAudioInStatusChanged(const RawAddress& bd_addr, uint8_t ext_input_id,
                                 bluetooth::vc::VolumeInputStatus status) override {
                                 VolumeInputStatus status) override {
    log::info("");

    std::shared_lock<std::shared_timed_mutex> lock(callbacks_mutex);
@@ -264,7 +268,7 @@ public:
  }

  void OnExtAudioInTypeChanged(const RawAddress& bd_addr, uint8_t ext_input_id,
                               bluetooth::vc::VolumeInputType type) override {
                               VolumeInputType type) override {
    log::info("");

    std::shared_lock<std::shared_timed_mutex> lock(callbacks_mutex);
+5 −0
Original line number Diff line number Diff line
@@ -655,12 +655,17 @@ cc_test {
        "vc/vc.cc",
        "vc/vc_test.cc",
    ],
    aidl: {
        libs: ["bluetooth_constants"],
    },
    shared_libs: [
        "libbase",
        "libbinder",
        "libcrypto",
        "liblog",
    ],
    static_libs: [
        "aics",
        "bluetooth_flags_c_lib_for_test",
        "libbluetooth-types",
        "libbluetooth_crypto_toolbox",
+2 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ static_library("bta") {
    "//bt/system/include",
    "//bt/system/linux_include",
    "//bt/system/bta",
    "//bt/system/bta/aics/include",
    "//bt/system/gd",
    "//bt/system/stack/include",
    "//bt/system/stack/btm",
@@ -173,6 +174,7 @@ static_library("bta") {
    "//bt/system/bta:install_audio_set_configurations_json",
    "//bt/system/bta:install_audio_set_scenarios_bfbs",
    "//bt/system/bta:install_audio_set_configurations_bfbs",
    "//bt/system/bta/aics:aics",
    "//bt/system:libbt-platform-protos-lite",
  ]

+32 −0
Original line number Diff line number Diff line
cc_library_headers {
    name: "aics_headers",
    export_include_dirs: ["include"],
    host_supported: true,
    vendor_available: true, // remove when https://r.android.com/3302734 is merged
    visibility: ["//packages/modules/Bluetooth:__subpackages__"],
    apex_available: ["com.android.btservices"],
    min_sdk_version: "33",
}

cc_library {
    name: "aics",
    defaults: ["fluoride_defaults"],
    srcs: [
        "aics.cc",
    ],
    aidl: {
        libs: ["bluetooth_constants"],
    },
    shared_libs: [
        "libbase",
        "libbinder",
        "libbluetooth_log",
        "liblog",
    ],
    header_libs: ["aics_headers"],
    export_header_lib_headers: ["aics_headers"],
    host_supported: true,
    visibility: ["//packages/modules/Bluetooth:__subpackages__"],
    apex_available: ["com.android.btservices"],
    min_sdk_version: "33",
}
Loading