diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index 2e1240b875c78179cfffad51cebb32500c1590ec..d0d534335ab7630d768efd57ede57ca4512aaf64 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 dfefac5f4baa8ced705e70302cba7444de03aa5c..6a667fdf6a8d4caba351d82b72edbf993f927d5b 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 b4169a0ad99bf279d162a2874fd552da0c989f55..29c24253e728ac3c467cafbd01edde2e5ee8dd42 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);