diff --git a/frameworks/js/napi/BUILD.gn b/frameworks/js/napi/BUILD.gn index 360bdbb8a1dc4152e864dccb7aab7f31b78a0237..dba1ecab8b2134cb8e496af3f324fbdc760350c1 100644 --- a/frameworks/js/napi/BUILD.gn +++ b/frameworks/js/napi/BUILD.gn @@ -71,13 +71,10 @@ ohos_shared_library("audio") { ] external_deps = [ - "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:napi_base_context", - "bundle_framework:appexecfwk_base", "c_utils:utils", "hiviewdfx_hilog_native:libhilog", - "ipc:ipc_core", "napi:ace_napi", "resource_management:global_resmgr", ] diff --git a/frameworks/js/napi/audio_manager/src/audio_manager_napi.cpp b/frameworks/js/napi/audio_manager/src/audio_manager_napi.cpp index 64adec2d48a97c90a42cff8b284051255f6e7840..cc0925c261bebf8632313ac736e824f9a9a51d6d 100644 --- a/frameworks/js/napi/audio_manager/src/audio_manager_napi.cpp +++ b/frameworks/js/napi/audio_manager/src/audio_manager_napi.cpp @@ -29,9 +29,6 @@ #include "hilog/log.h" #include "audio_log.h" -#include "ringtone_options_napi.h" -#include "ringtone_player_napi.h" -#include "system_sound_manager_napi.h" #include "toneplayer_napi.h" using namespace std; @@ -2865,10 +2862,6 @@ static napi_value Init(napi_env env, napi_value exports) AudioRendererNapi::Init(env, exports); TonePlayerNapi::Init(env, exports); AudioParametersNapi::Init(env, exports); - // RingtonePlayerNapi::Init(env, exports) need audio_ringtone_client - // SystemSoundManagerNapi::Init(env, exports) need audio_ringtone_client - // RingtoneOptionsNapi::Init(env, exports) need audio_ringtone_client - // AudioRendererInfoNapi::Init(env, exports) need audio_ringtone_client AudioStreamMgrNapi::Init(env, exports); AudioRoutingManagerNapi::Init(env, exports); AudioGroupManagerNapi::Init(env, exports); diff --git a/frameworks/native/audioadapter/BUILD.gn b/frameworks/native/audioadapter/BUILD.gn index c2b9d97d0b36bfd6439b3d2ec634635fe06ba25a..fecded6b43da3051445954c6b4d3058d878ae138 100644 --- a/frameworks/native/audioadapter/BUILD.gn +++ b/frameworks/native/audioadapter/BUILD.gn @@ -26,22 +26,16 @@ ohos_shared_library("pulse_audio_service_adapter") { "$pulseaudio_build_path/include", "//foundation/multimedia/audio_framework/frameworks/native/audioadapter/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", - "//third_party/libxml2/include", "//third_party/pulseaudio/src", "//third_party/pulseaudio/confgure/src", "//third_party/pulseaudio/include", - "//commonlibrary/c_utils/base/include", ] public_configs = [ ":audio_external_library_config" ] - deps = [ - "$pulseaudio_build_path/src/pulse:pulse", - "//third_party/libxml2:xml2", - ] + deps = [ "$pulseaudio_build_path/src/pulse:pulse" ] external_deps = [ - "c_utils:utils", "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", ] diff --git a/frameworks/native/audiocapturer/BUILD.gn b/frameworks/native/audiocapturer/BUILD.gn index 47ae9daa5ed135ffd30b9e5df6949edf11d70898..5e8a6c687bf96c61dd616a5203135f3de64865d3 100644 --- a/frameworks/native/audiocapturer/BUILD.gn +++ b/frameworks/native/audiocapturer/BUILD.gn @@ -47,10 +47,7 @@ ohos_shared_library("audio_capturer") { public_configs = [ ":audio_external_library_config" ] - external_deps = [ - "eventhandler:libeventhandler", - "hiviewdfx_hilog_native:libhilog", - ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] part_name = "multimedia_audio_framework" subsystem_name = "multimedia" diff --git a/frameworks/native/audiorenderer/BUILD.gn b/frameworks/native/audiorenderer/BUILD.gn index 4c45d7be7c2305b932b3f25b98cb983ca66b3bf8..f5dcc30024bf6928a17f4b9eb2301c6b3a9dd191 100644 --- a/frameworks/native/audiorenderer/BUILD.gn +++ b/frameworks/native/audiorenderer/BUILD.gn @@ -55,7 +55,6 @@ ohos_shared_library("audio_renderer") { external_deps = [ "c_utils:utils", - "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", ] diff --git a/frameworks/native/bluetoothclient/BUILD.gn b/frameworks/native/bluetoothclient/BUILD.gn index 135842d3e379d646d33cb7fe989652f1ad599701..0facacaae6bdb1c2b9c18a76ae0ac1d8f19f82f6 100644 --- a/frameworks/native/bluetoothclient/BUILD.gn +++ b/frameworks/native/bluetoothclient/BUILD.gn @@ -22,32 +22,11 @@ ohos_shared_library("audio_bluetooth_client") { include_dirs = [ "//foundation/multimedia/audio_framework/services/audio_policy/server/include/service/interface", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", - "//commonlibrary/c_utils/base/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//drivers/peripheral/bluetooth/audio/interfaces/include", - "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/include", - "//foundation/communication/bluetooth/interfaces/inner_api/include", - "//foundation/communication/bluetooth/interfaces/inner_api/include/c_header", - ] - - deps = [ - "$hdf_uhdf_path/hdi:libhdi", - "$hdf_uhdf_path/host:libhdf_host", - "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", - "$hdf_uhdf_path/utils:libhdf_utils", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/communication/bluetooth/frameworks/inner:btframework", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:bluetooth_renderer_sink", ] external_deps = [ "bluetooth:btframework", - "c_utils:utils", "hiviewdfx_hilog_native:libhilog", - "ipc:ipc_core", - "safwk:system_ability_fwk", - "samgr:samgr_proxy", ] part_name = "multimedia_audio_framework" diff --git a/frameworks/native/hdiadapter/sink/BUILD.gn b/frameworks/native/hdiadapter/sink/BUILD.gn index 4f1269e75c31d8453832c8d712e657842a986d03..1f990f9c6fb7b1da9686e47c0c9f3c0969be74b4 100644 --- a/frameworks/native/hdiadapter/sink/BUILD.gn +++ b/frameworks/native/hdiadapter/sink/BUILD.gn @@ -28,32 +28,20 @@ ohos_shared_library("audio_renderer_sink") { "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", - "//commonlibrary/c_utils/base/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//drivers/peripheral/audio/interfaces/include", - "//commonlibrary/c_utils/base/include", ] - public_configs = [ ":audio_external_library_config" ] - - deps = [ - "$hdf_uhdf_path/hdi:libhdi", - "$hdf_uhdf_path/host:libhdf_host", - "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", - "$hdf_uhdf_path/utils:libhdf_utils", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils", - "//third_party/bounds_checking_function:libsec_static", - ] + deps = [ "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils" ] deps += [ multimedia_audio_framework_hdi_audio_client ] - part_name = "multimedia_audio_framework" - subsystem_name = "multimedia" external_deps = [ - "c_utils:utils", + "hiviewdfx_hilog_native:libhilog", "power_manager:powermgr_client", ] + + part_name = "multimedia_audio_framework" + subsystem_name = "multimedia" } ohos_shared_library("bluetooth_renderer_sink") { @@ -69,30 +57,22 @@ ohos_shared_library("bluetooth_renderer_sink") { include_dirs = [ "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", - "//commonlibrary/c_utils/base/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//drivers/peripheral/bluetooth/audio/interfaces/include", "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/include", - "//commonlibrary/c_utils/base/include", ] - public_configs = [ ":audio_external_library_config" ] - deps = [ "$hdf_uhdf_path/hdi:libhdi", - "$hdf_uhdf_path/host:libhdf_host", - "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", - "$hdf_uhdf_path/utils:libhdf_utils", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//third_party/bounds_checking_function:libsec_static", ] - part_name = "multimedia_audio_framework" - subsystem_name = "multimedia" external_deps = [ - "c_utils:utils", + "hiviewdfx_hilog_native:libhilog", "power_manager:powermgr_client", ] + + part_name = "multimedia_audio_framework" + subsystem_name = "multimedia" } ohos_shared_library("remote_audio_renderer_sink") { @@ -111,32 +91,23 @@ ohos_shared_library("remote_audio_renderer_sink") { "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", - "//commonlibrary/c_utils/base/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//drivers/peripheral/audio/interfaces/include", - "//commonlibrary/c_utils/base/include", ] - public_configs = [ ":audio_external_library_config" ] - deps = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils", "//third_party/bounds_checking_function:libsec_static", ] + if ("${product_name}" == "m40") { deps += [ "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/audio_client:daudio_client" ] } else { - deps += [ - "$hdf_uhdf_path/hdi:libhdi", - "$hdf_uhdf_path/host:libhdf_host", - "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", - "$hdf_uhdf_path/utils:libhdf_utils", - "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client", - ] - external_deps = [ "c_utils:utils" ] + deps += + [ "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client" ] } + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] + part_name = "multimedia_audio_framework" subsystem_name = "multimedia" } @@ -151,19 +122,12 @@ ohos_shared_library("audio_renderer_file_sink") { cflags_cc = cflags - include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", - "//commonlibrary/c_utils/base/include", - ] - - public_configs = [ ":audio_external_library_config" ] + include_dirs = [ "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include" ] - deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] part_name = "multimedia_audio_framework" subsystem_name = "multimedia" - external_deps = [ "c_utils:utils" ] } ohos_shared_library("renderer_sink_adapter") { @@ -177,32 +141,24 @@ ohos_shared_library("renderer_sink_adapter") { cflags_cc = cflags include_dirs = [ - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/primary", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/file", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/bluetooth", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/remote", + "common", + "primary", + "file", + "bluetooth", + "remote", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//drivers/peripheral/audio/interfaces/include", - "//commonlibrary/c_utils/base:utils", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//third_party/bounds_checking_function:libsec_static", ] - public_configs = [ ":audio_external_library_config" ] - deps = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:audio_renderer_file_sink", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:audio_renderer_sink", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:bluetooth_renderer_sink", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:remote_audio_renderer_sink", + ":audio_renderer_file_sink", + ":audio_renderer_sink", + ":bluetooth_renderer_sink", + ":remote_audio_renderer_sink", ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] + part_name = "multimedia_audio_framework" subsystem_name = "multimedia" } - -config("audio_external_library_config") { - include_dirs = [ "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include" ] -} diff --git a/frameworks/native/hdiadapter/source/BUILD.gn b/frameworks/native/hdiadapter/source/BUILD.gn index b7bf97721be3f9a230e54f246a99fe450b711818..7ced62f3e2f5691cb7771593f29e6bda61c17842 100644 --- a/frameworks/native/hdiadapter/source/BUILD.gn +++ b/frameworks/native/hdiadapter/source/BUILD.gn @@ -26,28 +26,18 @@ ohos_shared_library("audio_capturer_source") { "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/frameworks/native/audioutils/include", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", - "//commonlibrary/c_utils/base/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//drivers/peripheral/audio/interfaces/include", - "//third_party/bounds_checking_function/include", - ] - public_configs = [ ":audio_external_library_config" ] - - deps = [ - "$hdf_uhdf_path/hdi:libhdi", - "$hdf_uhdf_path/host:libhdf_host", - "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", - "$hdf_uhdf_path/utils:libhdf_utils", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils", - "//third_party/bounds_checking_function:libsec_static", ] + deps = [ "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils" ] deps += [ multimedia_audio_framework_hdi_audio_client ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] + part_name = "multimedia_audio_framework" subsystem_name = "multimedia" } + ohos_shared_library("remote_audio_capturer_source") { install_enable = true sources = [ "remote/remote_audio_capturer_source.cpp" ] @@ -61,26 +51,17 @@ ohos_shared_library("remote_audio_capturer_source") { include_dirs = [ "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", - "//commonlibrary/c_utils/base/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", + "//drivers/peripheral/audio/interfaces/include", ] - include_dirs += [ "//drivers/peripheral/audio/interfaces/include" ] - public_configs = [ ":audio_external_library_config" ] - - deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ] if ("${product_name}" == "m40") { - deps += [ "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/audio_client:daudio_client" ] + deps = [ "//foundation/distributedhardware/distributed_audio/hdf_service/distributed_audio/audio_client:daudio_client" ] } else { - deps += [ - "$hdf_uhdf_path/hdi:libhdi", - "$hdf_uhdf_path/host:libhdf_host", - "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", - "$hdf_uhdf_path/utils:libhdf_utils", - "//drivers/peripheral/audio/hal/hdi_binder/proxy:hdi_audio_client", - ] + deps = [ multimedia_audio_framework_hdi_audio_client ] } + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] + part_name = "multimedia_audio_framework" subsystem_name = "multimedia" } @@ -96,20 +77,15 @@ ohos_shared_library("audio_capturer_file_source") { cflags_cc = cflags include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", "//drivers/peripheral/audio/interfaces/include", - "//commonlibrary/c_utils/base/include", ] - public_configs = [ ":audio_external_library_config" ] - - deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] part_name = "multimedia_audio_framework" subsystem_name = "multimedia" - external_deps = [ "c_utils:utils" ] } ohos_shared_library("capturer_source_adapter") { @@ -132,24 +108,16 @@ ohos_shared_library("capturer_source_adapter") { "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/remote", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//drivers/peripheral/audio/interfaces/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//commonlibrary/c_utils/base:utils", - "//third_party/bounds_checking_function:libsec_static", ] - public_configs = [ ":audio_external_library_config" ] - deps = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:audio_capturer_file_source", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:audio_capturer_source", - "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:remote_audio_capturer_source", + ":audio_capturer_file_source", + ":audio_capturer_source", + ":remote_audio_capturer_source", ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] + part_name = "multimedia_audio_framework" subsystem_name = "multimedia" } - -config("audio_external_library_config") { - include_dirs = [ "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include" ] -} diff --git a/frameworks/native/opensles/BUILD.gn b/frameworks/native/opensles/BUILD.gn index 497383b498fefdd0c9769a675b5ee80126469db4..7ac533cb0dc7de7f54ff6be182dd7e61126edc4b 100644 --- a/frameworks/native/opensles/BUILD.gn +++ b/frameworks/native/opensles/BUILD.gn @@ -83,16 +83,7 @@ ohos_shared_library("opensles") { "//foundation/multimedia/audio_framework/services/audio_service:audio_client", ] - external_deps = [ - "ability_base:want", - "bundle_framework:appexecfwk_base", - "bundle_framework:appexecfwk_core", - "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", - "ipc:ipc_core", - "safwk:system_ability_fwk", - "samgr:samgr_proxy", - ] + external_deps = [ "hiviewdfx_hilog_native:libhilog" ] output_name = "OpenSLES" output_extension = "so" diff --git a/frameworks/native/opensles/src/adapter/audioplayer_adapter.cpp b/frameworks/native/opensles/src/adapter/audioplayer_adapter.cpp index ed8dd317b43311a71960f8c55f4c62ef6a726ce3..2a4d43be00522bd3c803310fe187f5b96ecc0a0f 100644 --- a/frameworks/native/opensles/src/adapter/audioplayer_adapter.cpp +++ b/frameworks/native/opensles/src/adapter/audioplayer_adapter.cpp @@ -14,9 +14,6 @@ */ #include -#include "bundle_mgr_interface.h" -#include "iservice_registry.h" -#include "system_ability_definition.h" using namespace std; using namespace OHOS; diff --git a/services/audio_policy/BUILD.gn b/services/audio_policy/BUILD.gn index 4913333c2bccd16a6ed93e6c371514446596bf47..880036d28b0b4360346d94e0bedaed4b63e1e93f 100644 --- a/services/audio_policy/BUILD.gn +++ b/services/audio_policy/BUILD.gn @@ -53,11 +53,9 @@ config("audio_policy_public_config") { "//foundation/multimedia/audio_framework/services/audio_policy/common/include", "//foundation/multimedia/audio_framework/services/audio_policy/server/include", "//foundation/multimedia/audio_framework/services/audio_policy/client/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", "//foundation/systemabilitymgr/safwk/services/safwk/include", "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include", - "//base/hiviewdfx/hilog/interfaces/native/inner_api/include", "//drivers/peripheral/audio/interfaces/include", "//third_party/libxml2/include", "//third_party/pulseaudio/src", @@ -68,12 +66,7 @@ config("audio_policy_public_config") { "//commonlibrary/c_utils/base/include", "//third_party/bounds_checking_function/include", "//third_party/cJSON", - "//drivers/peripheral/bluetooth/audio/interfaces/include", - "//foundation/communication/bluetooth/interfaces/frameworks/inner/common", "//foundation/communication/bluetooth/interfaces/inner_api/include", - "//foundation/communication/bluetooth/interfaces/inner_api/include/c_header", - "//foundation/communication/bluetooth/services/bluetooth/ipc/include", - "//foundation/communication/bluetooth/services/bluetooth/common/", ] cflags = [ @@ -141,11 +134,6 @@ ohos_shared_library("audio_policy_service") { deps = [ "$hdf_uhdf_path/hdi:libhdi", - "$hdf_uhdf_path/host:libhdf_host", - "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", - "$hdf_uhdf_path/utils:libhdf_utils", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", - "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter", "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:distributeddata_inner", "//foundation/multimedia/audio_framework/frameworks/native/audioadapter:pulse_audio_service_adapter", "//foundation/multimedia/audio_framework/services/audio_policy:audio_dump", @@ -171,9 +159,8 @@ ohos_shared_library("audio_policy_service") { if (bluetooth_part_enable == true) { deps += [ "//foundation/multimedia/audio_framework/frameworks/native/bluetoothclient:audio_bluetooth_client" ] - - external_deps += [ "bluetooth:btframework" ] } + subsystem_name = "multimedia" part_name = "multimedia_audio_framework" } @@ -198,18 +185,12 @@ ohos_prebuilt_etc("audio_tone_dtmf_config") { config("audio_policy_client_config") { include_dirs = [ "//foundation/multimedia/audio_framework/services/audio_service/client/include", - "//foundation/systemabilitymgr/safwk/services/safwk/include", "//foundation/multimedia/audio_framework/frameworks/native/audiopolicy/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiomanager/include", "//foundation/multimedia/audio_framework/services/audio_policy/common/include", "//foundation/multimedia/audio_framework/services/audio_policy/client/include", "//foundation/multimedia/audio_framework/services/audio_policy/server/include", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", - "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//utils/system/safwk/native/include", - "//commonlibrary/c_utils/base/include", "//third_party/bounds_checking_function/include", ] @@ -245,7 +226,6 @@ ohos_shared_library("audio_policy_client") { "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", - "safwk:system_ability_fwk", "samgr:samgr_proxy", ] subsystem_name = "multimedia" diff --git a/services/audio_policy/server/include/audio_service_dump.h b/services/audio_policy/server/include/audio_service_dump.h index 1455a620146cd6595c1c196389a5696f4822ea08..834445b4c088ed747329eada8cfb034d2d366453 100644 --- a/services/audio_policy/server/include/audio_service_dump.h +++ b/services/audio_policy/server/include/audio_service_dump.h @@ -29,19 +29,6 @@ namespace OHOS { namespace AudioStandard { -constexpr int STRING_BUFFER_SIZE = 4096; -template - -void AppendFormat(std::string& out, const char* fmt, Args&& ... args) -{ - char buf[STRING_BUFFER_SIZE] = {0}; - int len = ::sprintf_s(buf, sizeof(buf), fmt, args...); - if (len <= 0) { - AUDIO_ERR_LOG("snprintf_s error : buffer allocation fails"); - return; - } - out += buf; -} static const int32_t AUDIO_DUMP_SUCCESS = 0; static const int32_t AUDIO_DUMP_INIT_ERR = -1; diff --git a/services/audio_policy/server/src/service/dump/audio_service_dump.cpp b/services/audio_policy/server/src/service/dump/audio_service_dump.cpp index 3609ae4bfd9965d044d164b1f10b11e8a6d5381a..9d82ff05e39ca1670387b64b7629e3ed248b9593 100644 --- a/services/audio_policy/server/src/service/dump/audio_service_dump.cpp +++ b/services/audio_policy/server/src/service/dump/audio_service_dump.cpp @@ -19,6 +19,21 @@ using namespace std; namespace OHOS { namespace AudioStandard { + +constexpr int STRING_BUFFER_SIZE = 4096; + +template +void AppendFormat(std::string& out, const char* fmt, Args&& ... args) +{ + char buf[STRING_BUFFER_SIZE] = {0}; + int len = ::sprintf_s(buf, sizeof(buf), fmt, args...); + if (len <= 0) { + AUDIO_ERR_LOG("snprintf_s error : buffer allocation fails"); + return; + } + out += buf; +} + AudioServiceDump::AudioServiceDump() : mainLoop(nullptr), api(nullptr), context(nullptr), diff --git a/services/audio_service/BUILD.gn b/services/audio_service/BUILD.gn index 148aeedf5db1f658e4ef4e4106e3cbd494314755..6798ea9e2847acf1f6a19db26471413bc6a1eb2c 100644 --- a/services/audio_service/BUILD.gn +++ b/services/audio_service/BUILD.gn @@ -80,7 +80,6 @@ ohos_shared_library("audio_client") { "$pulseaudio_build_path/src/pulse:pulse", "//foundation/multimedia/audio_framework/frameworks/native/audioutils:audio_utils", "//foundation/multimedia/audio_framework/services/audio_policy:audio_policy_client", - "//third_party/bounds_checking_function:libsec_static", ] external_deps = [ @@ -108,8 +107,10 @@ config("audio_service_config") { include_dirs = [ "common/include", "server/include", + "client/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", + "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiomanager/include", + "//foundation/multimedia/audio_framework/frameworks/native/audiopolicy/include", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/primary", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/remote", @@ -118,7 +119,6 @@ config("audio_service_config") { "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/primary", "//drivers/peripheral/audio/interfaces/include", - "include/audio_service/common", ] if (target_cpu == "arm") { @@ -147,7 +147,6 @@ ohos_shared_library("audio_service") { "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:remote_audio_renderer_sink", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:renderer_sink_adapter", "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:audio_capturer_source", - "//foundation/multimedia/audio_framework/services/audio_service:audio_client", ] external_deps = [ @@ -157,7 +156,6 @@ ohos_shared_library("audio_service") { "ipc:ipc_core", "power_manager:powermgr_client", "safwk:system_ability_fwk", - "samgr:samgr_proxy", ] subsystem_name = "multimedia" diff --git a/services/audio_service/client/include/audio_manager_base.h b/services/audio_service/client/include/audio_manager_base.h index 7f04a421aa2afb369b6f454d9f52ed87baff1707..7948a07f733e995f3d0442028e0f6cb498e5fa9f 100644 --- a/services/audio_service/client/include/audio_manager_base.h +++ b/services/audio_service/client/include/audio_manager_base.h @@ -193,8 +193,8 @@ public: class AudioManagerStub : public IRemoteStub { public: - virtual int OnRemoteRequest(uint32_t code, MessageParcel &data, - MessageParcel &reply, MessageOption &option) override; + virtual int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, + MessageOption &option) override; }; } // namespace AudioStandard } // namespace OHOS diff --git a/test/fuzztest/audiopolicy_fuzzer/BUILD.gn b/test/fuzztest/audiopolicy_fuzzer/BUILD.gn index 026c0a1781710f944ce33288c4465352f7bbd7d5..5100bbcaa5e563457b43ff580cbaf5ce67f437f1 100644 --- a/test/fuzztest/audiopolicy_fuzzer/BUILD.gn +++ b/test/fuzztest/audiopolicy_fuzzer/BUILD.gn @@ -44,6 +44,7 @@ ohos_fuzztest("AudioPolicyFuzzTest") { "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", + "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", ]