diff --git a/frameworks/js/napi/common/napi_dfx_utils.cpp b/frameworks/js/napi/common/napi_dfx_utils.cpp index 76f776b1279062469794778672c6ab597d98ce15..237204610b42861715c32177544921c15cce313f 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 3008aeae9964434ac16265bc35e237b0ddbf4421..ba29af87ab0c97e2fe3b26b349388025771af846 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", ]