From 6e073b29ee6b90572719590cf35fd9864c2dc19d Mon Sep 17 00:00:00 2001 From: tlzhou0731 Date: Thu, 4 Sep 2025 15:56:29 +0800 Subject: [PATCH] =?UTF-8?q?arkui=E7=BC=96=E8=AF=91=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tlzhou0731 --- frameworks/js/napi/common/napi_dfx_utils.cpp | 4 ++++ plugins/cross/audio.gni | 1 + 2 files changed, 5 insertions(+) diff --git a/frameworks/js/napi/common/napi_dfx_utils.cpp b/frameworks/js/napi/common/napi_dfx_utils.cpp index 76f776b127..237204610b 100644 --- a/frameworks/js/napi/common/napi_dfx_utils.cpp +++ b/frameworks/js/napi/common/napi_dfx_utils.cpp @@ -16,14 +16,17 @@ #include #include "napi_dfx_utils.h" #include "audio_common_log.h" +#ifndef CROSS_PLATFORM #include "media_monitor_manager.h" #include "media_monitor_info.h" +#endif namespace OHOS { namespace AudioStandard { void NapiDfxUtils::SendVolumeApiInvokeEvent(int32_t uid, const std::string &functionName, int32_t paramValue) { +#ifndef CROSS_PLATFORM std::shared_ptr bean = std::make_shared( Media::MediaMonitor::ModuleId::AUDIO, Media::MediaMonitor::EventId::VOLUME_API_INVOKE, Media::MediaMonitor::EventType::FREQUENCY_AGGREGATION_EVENT); @@ -31,6 +34,7 @@ void NapiDfxUtils::SendVolumeApiInvokeEvent(int32_t uid, const std::string &func bean->Add("FUNC_NAME", functionName); bean->Add("PARAM_VALUE", paramValue); Media::MediaMonitor::MediaMonitorManager::GetInstance().WriteLogMsg(bean); +#endif } } // namespace AudioStandard } // namespace OHOS \ No newline at end of file diff --git a/plugins/cross/audio.gni b/plugins/cross/audio.gni index 3008aeae99..ba29af87ab 100644 --- a/plugins/cross/audio.gni +++ b/plugins/cross/audio.gni @@ -65,5 +65,6 @@ audio_sources = [ "$WORK_DIR/common/napi_async_work.cpp", "$WORK_DIR/common/napi_audio_enum.cpp", "$WORK_DIR/common/napi_audio_error.cpp", + "$WORK_DIR/common/napi_dfx_utils.cpp", "$WORK_DIR/common/napi_param_utils.cpp", ] -- Gitee