代码拉取完成,页面将自动刷新
同步操作将从 chrisshangguan/customization_config_policy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/config_policy.gni b/config_policy.gni
index c4a6a69..1d0388e 100644
--- a/config_policy.gni
+++ b/config_policy.gni
@@ -16,5 +16,5 @@ declare_args() {
config_policy_fs_prefix = ""
# Whether support napi so
- support_config_policy_napi = true
+ support_config_policy_napi = false
}
diff --git a/frameworks/config_policy/BUILD.gn b/frameworks/config_policy/BUILD.gn
index 96ed151..effa0f9 100644
--- a/frameworks/config_policy/BUILD.gn
+++ b/frameworks/config_policy/BUILD.gn
@@ -53,7 +53,7 @@ if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") {
"etc:customization_etc",
"//third_party/bounds_checking_function:libsec_shared",
]
- external_deps = [ "init:libbegetutil" ]
+ # external_deps = [ "init:libbegetutil" ]
subsystem_name = "customization"
part_name = "config_policy"
diff --git a/frameworks/config_policy/src/config_policy_utils.c b/frameworks/config_policy/src/config_policy_utils.c
index 1eb483c..f821693 100644
--- a/frameworks/config_policy/src/config_policy_utils.c
+++ b/frameworks/config_policy/src/config_policy_utils.c
@@ -22,9 +22,18 @@
#include "config_policy_impl.h"
#ifndef __LITEOS__
-#include "init_param.h"
+/* #include "init_param.h" */
#endif
+#define SystemGetParameter SystemReadParamStub
+static int SystemReadParamStub(const char *name, char *value, unsigned int *len)
+{
+ (void)name;
+ (void)value;
+ (void)len;
+ return -1;
+}
+
static const size_t MIN_APPEND_LEN = 32;
// ':' split different x rules, example:":relPath,mode[,extra][:]"
// ',' split different param for x rules
@@ -93,7 +102,6 @@ static char *CustGetSystemParam(const char *name)
{
char *value = NULL;
unsigned int len = 0;
-
if (SystemGetParameter(name, NULL, &len) != 0 || len == 0) {
return NULL;
}
diff --git a/frameworks/dfx/hisysevent_adapter/hisysevent_adapter.cpp b/frameworks/dfx/hisysevent_adapter/hisysevent_adapter.cpp
index f486dd8..bd84ab0 100644
--- a/frameworks/dfx/hisysevent_adapter/hisysevent_adapter.cpp
+++ b/frameworks/dfx/hisysevent_adapter/hisysevent_adapter.cpp
@@ -14,7 +14,7 @@
*/
#include "hisysevent_adapter.h"
-#include "hisysevent.h"
+// #include "hisysevent.h"
#include "hilog/log.h"
namespace OHOS {
@@ -22,23 +22,24 @@ namespace Customization {
namespace ConfigPolicy {
using namespace OHOS::HiviewDFX;
static constexpr HiLogLabel LABEL = { LOG_CORE, 0xD001E00, "ReportConfigPolicyEvent" };
-const std::string DOMAIN_STR = std::string(HiSysEvent::Domain::CUSTOMIZATION_CONFIG);
+// const std::string DOMAIN_STR = std::string(HiSysEvent::Domain::CUSTOMIZATION_CONFIG);
void ReportConfigPolicyEvent(ReportType reportType, const std::string &apiName, const std::string &msgInfo)
{
- int ret;
- if (reportType == ReportType::CONFIG_POLICY_FAILED) {
- ret = HiSysEvent::Write(DOMAIN_STR, "CONFIG_POLICY_FAILED", HiSysEvent::EventType::FAULT, "APINAME", apiName,
- "MSG", msgInfo);
- } else {
- ret =
- HiSysEvent::Write(DOMAIN_STR, "CONFIG_POLICY_EVENT", HiSysEvent::EventType::STATISTIC, "APINAME", apiName);
- }
+ return;
+ // int ret;
+ // if (reportType == ReportType::CONFIG_POLICY_FAILED) {
+ // ret = HiSysEvent::Write(DOMAIN_STR, "CONFIG_POLICY_FAILED", HiSysEvent::EventType::FAULT, "APINAME", apiName,
+ // "MSG", msgInfo);
+ // } else {
+ // ret =
+ // HiSysEvent::Write(DOMAIN_STR, "CONFIG_POLICY_EVENT", HiSysEvent::EventType::STATISTIC, "APINAME", apiName);
+ // }
- if (ret != 0) {
- HiLog::Error(LABEL, "hisysevent write failed! ret %{public}d, apiName %{public}s, errMsg %{public}s", ret,
- apiName.c_str(), msgInfo.c_str());
- }
+ // if (ret != 0) {
+ // HiLog::Error(LABEL, "hisysevent write failed! ret %{public}d, apiName %{public}s, errMsg %{public}s", ret,
+ // apiName.c_str(), msgInfo.c_str());
+ // }
}
} // namespace ConfigPolicy
} // namespace Customization
diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn
index 2640cea..bf4c27f 100644
--- a/interfaces/kits/js/BUILD.gn
+++ b/interfaces/kits/js/BUILD.gn
@@ -28,9 +28,8 @@ ohos_shared_library("configpolicy") {
deps = [ "//base/customization/config_policy/frameworks/config_policy:configpolicy_util" ]
external_deps = [
- "hisysevent_native:libhisysevent",
+ # "hisysevent_native:libhisysevent",
"hiviewdfx_hilog_native:libhilog",
- "napi:ace_napi",
]
relative_install_dir = "module"
subsystem_name = "customization"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。