From b13fc7c4345433b0cc48780496b315d2322f0513 Mon Sep 17 00:00:00 2001 From: fangyun Date: Wed, 10 Aug 2022 16:56:55 +0800 Subject: [PATCH 1/5] fixed getEnterpriseInfo interface callback method Signed-off-by: fangyun --- interfaces/kits/src/enterprise_device_manager_addon.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/interfaces/kits/src/enterprise_device_manager_addon.cpp b/interfaces/kits/src/enterprise_device_manager_addon.cpp index b28b25310..3d81debd5 100644 --- a/interfaces/kits/src/enterprise_device_manager_addon.cpp +++ b/interfaces/kits/src/enterprise_device_manager_addon.cpp @@ -418,7 +418,6 @@ void EnterpriseDeviceManagerAddon::NativeGetEnterpriseInfoComplete(napi_env env, napi_value result[2] = { 0 }; if (asyncCallbackInfo->ret == ERR_OK) { - napi_create_uint32(env, 0, &result[0]); napi_create_object(env, &result[1]); ConvertEnterpriseInfo(env, result[1], asyncCallbackInfo->entInfo); EDMLOGD("NativeGetEnterpriseInfoComplete::asyncCallbackInfo->entInfo->enterpriseName %{public}s, " -- Gitee From db2231d7a4251efd55273d78bc930c74051f48a2 Mon Sep 17 00:00:00 2001 From: fangyun Date: Thu, 11 Aug 2022 21:13:27 +0800 Subject: [PATCH 2/5] delete commonlibrary/c_utils in include Signed-off-by: fangyun --- bundle.json | 2 +- framework/extension/BUILD.gn | 2 -- interfaces/inner_api/BUILD.gn | 1 - interfaces/kits/src/enterprise_device_manager_addon.cpp | 1 + services/edm/BUILD.gn | 2 -- services/edm_plugin/plugin.gni | 4 +--- test/fuzztest/disablesuperadmin_fuzzer/BUILD.gn | 2 -- test/fuzztest/entinfo_fuzzer/BUILD.gn | 2 -- test/unittest/BUILD.gn | 2 -- tools/edm/include/shell_command.h | 2 +- 10 files changed, 4 insertions(+), 16 deletions(-) diff --git a/bundle.json b/bundle.json index 7a1a27693..d8fd8c2c3 100644 --- a/bundle.json +++ b/bundle.json @@ -56,7 +56,7 @@ "bundle_framework", "common", "common_event_service", - "c_utils", + "c_utils", "hisysevent_native", "hiviewdfx_hilog_native", "ipc", diff --git a/framework/extension/BUILD.gn b/framework/extension/BUILD.gn index 0d098981f..6709ae9a1 100644 --- a/framework/extension/BUILD.gn +++ b/framework/extension/BUILD.gn @@ -24,8 +24,6 @@ config("enterprise_admin_config") { "${aafwk_path}/frameworks/native/ability/native/", "//foundation/arkui/napi/native_engine", "${SUBSYSTEM_DIR}/common/native/include", - "//commonlibrary/c_utils/base:utils_config", - "//commonlibrary/c_utils/base/include", ] } diff --git a/interfaces/inner_api/BUILD.gn b/interfaces/inner_api/BUILD.gn index 10918748c..7bc5df7d6 100644 --- a/interfaces/inner_api/BUILD.gn +++ b/interfaces/inner_api/BUILD.gn @@ -20,7 +20,6 @@ INCLUDE_PATH = "$ROOT/include" config("edmservice_kits_config") { include_dirs = [ - "//commonlibrary/c_utils/base/include", "include", "$SUBSYSTEM_DIR/common/native/include", ] diff --git a/interfaces/kits/src/enterprise_device_manager_addon.cpp b/interfaces/kits/src/enterprise_device_manager_addon.cpp index 3d81debd5..b28b25310 100644 --- a/interfaces/kits/src/enterprise_device_manager_addon.cpp +++ b/interfaces/kits/src/enterprise_device_manager_addon.cpp @@ -418,6 +418,7 @@ void EnterpriseDeviceManagerAddon::NativeGetEnterpriseInfoComplete(napi_env env, napi_value result[2] = { 0 }; if (asyncCallbackInfo->ret == ERR_OK) { + napi_create_uint32(env, 0, &result[0]); napi_create_object(env, &result[1]); ConvertEnterpriseInfo(env, result[1], asyncCallbackInfo->entInfo); EDMLOGD("NativeGetEnterpriseInfoComplete::asyncCallbackInfo->entInfo->enterpriseName %{public}s, " diff --git a/services/edm/BUILD.gn b/services/edm/BUILD.gn index c0458cabd..c2a0b2ffc 100644 --- a/services/edm/BUILD.gn +++ b/services/edm/BUILD.gn @@ -21,10 +21,8 @@ JSONCPP_INCLUDE_DIR = "//third_party/jsoncpp/include" config("edm_config") { cflags = [ "-Wno-error=implicit-fallthrough" ] include_dirs = [ - "//commonlibrary/c_utils/base/include", "include", "include/utils", - "//commonlibrary/c_utils/base:utils_config", JSONCPP_INCLUDE_DIR, "$SUBSYSTEM_DIR/common/native/include", "$SUBSYSTEM_DIR/framework/extension/include", diff --git a/services/edm_plugin/plugin.gni b/services/edm_plugin/plugin.gni index 9e0d61c78..7008f3330 100644 --- a/services/edm_plugin/plugin.gni +++ b/services/edm_plugin/plugin.gni @@ -18,13 +18,11 @@ template("edm_plugin_shared_library") { forward_variables_from(invoker, "*") include_dirs += [ - "//utils/native/base/include", "//utils/system/safwk/native/include", "//base/customization/enterprise_device_management/services/edm/include", "//base/customization/enterprise_device_management/interfaces/inner_api/include", "//base/customization/enterprise_device_management/services/edm/include/utils", "//base/customization/enterprise_device_management/services/edm_plugin/include", - "//utils/native/base:utils_config", "//third_party/jsoncpp/include", ] if (defined(invoker.include_dirs)) { @@ -40,7 +38,6 @@ template("edm_plugin_shared_library") { } deps += [ "//base/customization/enterprise_device_management/services/edm:edmservice", - "//utils/native/base:utils", ] if (defined(invoker.deps)) { @@ -49,6 +46,7 @@ template("edm_plugin_shared_library") { external_deps += [ "bundle_framework:appexecfwk_base", + "c_utils:utils" "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", diff --git a/test/fuzztest/disablesuperadmin_fuzzer/BUILD.gn b/test/fuzztest/disablesuperadmin_fuzzer/BUILD.gn index 82d1a2f58..999c37e17 100644 --- a/test/fuzztest/disablesuperadmin_fuzzer/BUILD.gn +++ b/test/fuzztest/disablesuperadmin_fuzzer/BUILD.gn @@ -27,10 +27,8 @@ ohos_fuzztest("DisableSuperAdminFuzzTest") { fuzz_config_file = "//base/customization/enterprise_device_management/test/fuzztest/disablesuperadmin_fuzzer" include_dirs = [ - "//commonlibrary/c_utils/base/include", "include", "include/utils", - "//commonlibrary/c_utils/base:utils_config", JSONCPP_INCLUDE_DIR, "$SUBSYSTEM_DIR/common/native/include", ] diff --git a/test/fuzztest/entinfo_fuzzer/BUILD.gn b/test/fuzztest/entinfo_fuzzer/BUILD.gn index e837f6313..53d44257c 100644 --- a/test/fuzztest/entinfo_fuzzer/BUILD.gn +++ b/test/fuzztest/entinfo_fuzzer/BUILD.gn @@ -27,10 +27,8 @@ ohos_fuzztest("EntInfoFuzzTest") { fuzz_config_file = "//base/customization/enterprise_device_management/test/fuzztest/entinfo_fuzzer" include_dirs = [ - "//commonlibrary/c_utils/base/include", "include", "include/utils", - "//commonlibrary/c_utils/base:utils_config", JSONCPP_INCLUDE_DIR, "$SUBSYSTEM_DIR/common/native/include", ] diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index ea4ee70a1..88e0f14e9 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -27,11 +27,9 @@ ohos_unittest("EdmServicesUnitTest") { module_out_path = module_output_path include_dirs = [ - "//commonlibrary/c_utils/base/include", "//utils/system/safwk/native/include", "$EDM_ROOT/include", "$EDM_ROOT/include/utils", - "//commonlibrary/c_utils/base:utils_config", JSONCPP_INCLUDE_DIR, "./include", "$SUBSYSTEM_DIR/interfaces/inner_api/include", diff --git a/tools/edm/include/shell_command.h b/tools/edm/include/shell_command.h index 374f3cf8e..6e8cbad60 100644 --- a/tools/edm/include/shell_command.h +++ b/tools/edm/include/shell_command.h @@ -21,7 +21,7 @@ #include #include -#include "utils/native/base/include/errors.h" +#include "commonlibrary/c_utils/base/include/errors.h" namespace OHOS { namespace EDM { -- Gitee From c811cbd48970f232676ce7a1c7f4661d15ecb8dd Mon Sep 17 00:00:00 2001 From: fangyun Date: Thu, 11 Aug 2022 21:16:27 +0800 Subject: [PATCH 3/5] delete commonlibrary/c_utils in include Signed-off-by: fangyun --- bundle.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle.json b/bundle.json index d8fd8c2c3..7ff2f5c2a 100644 --- a/bundle.json +++ b/bundle.json @@ -56,7 +56,7 @@ "bundle_framework", "common", "common_event_service", - "c_utils", + "c_utils", "hisysevent_native", "hiviewdfx_hilog_native", "ipc", -- Gitee From 9aa2a118f4cb1206a425d31daef0055815645f6d Mon Sep 17 00:00:00 2001 From: fangyun Date: Thu, 11 Aug 2022 21:51:24 +0800 Subject: [PATCH 4/5] delete commonlibrary/c_utils in include Signed-off-by: fangyun --- bundle.json | 2 +- services/edm_plugin/plugin.gni | 2 +- tools/edm/include/shell_command.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundle.json b/bundle.json index 7ff2f5c2a..7a1a27693 100644 --- a/bundle.json +++ b/bundle.json @@ -56,7 +56,7 @@ "bundle_framework", "common", "common_event_service", - "c_utils", + "c_utils", "hisysevent_native", "hiviewdfx_hilog_native", "ipc", diff --git a/services/edm_plugin/plugin.gni b/services/edm_plugin/plugin.gni index 7008f3330..0c57bd37b 100644 --- a/services/edm_plugin/plugin.gni +++ b/services/edm_plugin/plugin.gni @@ -46,7 +46,7 @@ template("edm_plugin_shared_library") { external_deps += [ "bundle_framework:appexecfwk_base", - "c_utils:utils" + "c_utils:utils", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", diff --git a/tools/edm/include/shell_command.h b/tools/edm/include/shell_command.h index 6e8cbad60..374f3cf8e 100644 --- a/tools/edm/include/shell_command.h +++ b/tools/edm/include/shell_command.h @@ -21,7 +21,7 @@ #include #include -#include "commonlibrary/c_utils/base/include/errors.h" +#include "utils/native/base/include/errors.h" namespace OHOS { namespace EDM { -- Gitee From b52ffc225a6a21759c6cd15818a38d600363dd4f Mon Sep 17 00:00:00 2001 From: fangyun Date: Fri, 12 Aug 2022 20:20:30 +0800 Subject: [PATCH 5/5] delete commonlibrary/c_utils in include Signed-off-by: fangyun --- services/edm_plugin/plugin.gni | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/edm_plugin/plugin.gni b/services/edm_plugin/plugin.gni index 0c57bd37b..3d844b79f 100644 --- a/services/edm_plugin/plugin.gni +++ b/services/edm_plugin/plugin.gni @@ -36,9 +36,7 @@ template("edm_plugin_shared_library") { if (!defined(deps)) { deps = [] } - deps += [ - "//base/customization/enterprise_device_management/services/edm:edmservice", - ] + deps += [ "//base/customization/enterprise_device_management/services/edm:edmservice" ] if (defined(invoker.deps)) { deps += invoker.deps -- Gitee