Loading android/app/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -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", Loading android/app/jni/com_android_bluetooth_vc.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #define LOG_TAG "BluetoothVolumeControlServiceJni" #include <aics/api.h> #include <bluetooth/log.h> #include <jni.h> #include <nativehelper/JNIHelp.h> Loading @@ -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; Loading Loading @@ -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); Loading @@ -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); Loading @@ -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); Loading system/bta/Android.bp +5 −0 Original line number Diff line number Diff line Loading @@ -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", Loading system/bta/BUILD.gn +2 −0 Original line number Diff line number Diff line Loading @@ -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", Loading Loading @@ -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", ] Loading system/bta/aics/Android.bp 0 → 100644 +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
android/app/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -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", Loading
android/app/jni/com_android_bluetooth_vc.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #define LOG_TAG "BluetoothVolumeControlServiceJni" #include <aics/api.h> #include <bluetooth/log.h> #include <jni.h> #include <nativehelper/JNIHelp.h> Loading @@ -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; Loading Loading @@ -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); Loading @@ -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); Loading @@ -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); Loading
system/bta/Android.bp +5 −0 Original line number Diff line number Diff line Loading @@ -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", Loading
system/bta/BUILD.gn +2 −0 Original line number Diff line number Diff line Loading @@ -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", Loading Loading @@ -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", ] Loading
system/bta/aics/Android.bp 0 → 100644 +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", }