From 65cfcf099d28207994ce7781adfe1bda2791242d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=87=AF=E6=98=8E?= Date: Tue, 29 Apr 2025 13:54:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=AE=9A=E4=BD=8D=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 谢凯明 --- interfaces/kits/js/BUILD.gn | 3 --- interfaces/kits/js/src/config_policy_napi.cpp | 6 ------ interfaces/kits/js/src/custom_config_napi.cpp | 2 -- 3 files changed, 11 deletions(-) diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index 2e1240b..d0d5343 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -40,11 +40,9 @@ ohos_shared_library("customconfig") { include_dirs = [ "include", "../../../interfaces/inner_api/include", - "../../../frameworks/dfx/hisysevent_adapter", ] sources = [ - "../../../frameworks/dfx/hisysevent_adapter/hisysevent_adapter.cpp", "src/custom_config_napi.cpp", ] @@ -53,7 +51,6 @@ ohos_shared_library("customconfig") { "ability_runtime:app_context", "c_utils:utils", "hilog:libhilog", - "hisysevent:libhisysevent", "init:libbegetutil", "napi:ace_napi", ] diff --git a/interfaces/kits/js/src/config_policy_napi.cpp b/interfaces/kits/js/src/config_policy_napi.cpp index dfefac5..6a667fd 100644 --- a/interfaces/kits/js/src/config_policy_napi.cpp +++ b/interfaces/kits/js/src/config_policy_napi.cpp @@ -299,7 +299,6 @@ void ConfigPolicyNapi::NativeGetOneCfgFile(napi_env env, void *data) asyncCallbackInfo->followMode_, asyncCallbackInfo->extra_.c_str()); if (filePath == nullptr) { HILOG_DEBUG(LOG_CORE, "GetOneCfgFileEx result is nullptr."); - ReportConfigPolicyEvent(ReportType::CONFIG_POLICY_FAILED, "getOneCfgFile", "CfgFile path is nullptr."); } else { asyncCallbackInfo->pathValue_ = std::string(filePath); } @@ -318,7 +317,6 @@ napi_value ConfigPolicyNapi::NativeGetOneCfgFileSync(napi_env env, std::shared_p context->followMode_, context->extra_.c_str()); if (filePath == nullptr) { HILOG_DEBUG(LOG_CORE, "GetOneCfgFileEx result is nullptr."); - ReportConfigPolicyEvent(ReportType::CONFIG_POLICY_FAILED, "getOneCfgFileSync", "CfgFile path is nullptr."); } else { context->pathValue_ = std::string(filePath); } @@ -345,8 +343,6 @@ void ConfigPolicyNapi::NativeGetCfgFiles(napi_env env, void *data) } } FreeCfgFiles(cfgFiles); - } else { - ReportConfigPolicyEvent(ReportType::CONFIG_POLICY_FAILED, "getCfgFiles", "CfgFiles is nullptr."); } CreateArraysValueFunc(*asyncCallbackInfo); } @@ -363,8 +359,6 @@ napi_value ConfigPolicyNapi::NativeGetCfgFilesSync(napi_env env, std::shared_ptr } } FreeCfgFiles(cfgFiles); - } else { - ReportConfigPolicyEvent(ReportType::CONFIG_POLICY_FAILED, "getCfgFilesSync", "CfgFiles is nullptr."); } return CreateArraysValue(env, context); } diff --git a/interfaces/kits/js/src/custom_config_napi.cpp b/interfaces/kits/js/src/custom_config_napi.cpp index b4169a0..29c2425 100644 --- a/interfaces/kits/js/src/custom_config_napi.cpp +++ b/interfaces/kits/js/src/custom_config_napi.cpp @@ -17,7 +17,6 @@ #include "application_context.h" #include "hilog/log.h" -#include "hisysevent_adapter.h" #include "init_param.h" #undef LOG_DOMAIN @@ -119,7 +118,6 @@ napi_value CustomConfigNapi::NativeGetChannelId(napi_env env, std::string channe napi_value result = nullptr; if (channelId == nullptr) { HILOG_WARN(LOG_CORE, "get channelId failed."); - ReportConfigPolicyEvent(ReportType::CONFIG_POLICY_FAILED, "getChannelId", "ChannelId is nullptr."); return CreateNapiStringValue(env, ""); } result = CreateNapiStringValue(env, channelId); -- Gitee