From f32e2a0450e6c0b974d68ab941612ddf7b110719 Mon Sep 17 00:00:00 2001 From: 15950533375 Date: Wed, 3 Jul 2024 11:46:37 +0800 Subject: [PATCH] fix hisysEVENT Signed-off-by: woohoa --- bundle.json | 3 ++ .../include/app_domain_verify_hisysevent.h | 16 ++++----- hisysevent.yaml | 34 +++++++++++++++++++ 3 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 hisysevent.yaml diff --git a/bundle.json b/bundle.json index 390e8d1..e596ee1 100644 --- a/bundle.json +++ b/bundle.json @@ -14,6 +14,9 @@ "subsystem": "bundlemanager", "syscap": [], "features": ["app_domain_verify_cut_link_convert"], + "hisysevent_config": [ + "//foundation/bundlemanager/app_domain_verify/hisysevent.yaml" + ], "adapted_system_type": [ "standard" ], diff --git a/frameworks/common/include/app_domain_verify_hisysevent.h b/frameworks/common/include/app_domain_verify_hisysevent.h index bae6d04..11ee329 100644 --- a/frameworks/common/include/app_domain_verify_hisysevent.h +++ b/frameworks/common/include/app_domain_verify_hisysevent.h @@ -19,17 +19,17 @@ namespace OHOS { namespace AppDomainVerify { -static constexpr char APP_DOMAIN_VERIFY[] = "APP_DOMAIN_VERIFY"; +static constexpr char APP_DOMAIN_VERIFY[] = "APPDOMAINVERIFY"; namespace EventType { -const std::string APP_INSTALL_EVENT = "pkg_install"; -const std::string APP_DELETE_EVENT = "pkg_uninstall"; -const std::string APP_VERIFY_EVENT = "pkg_verify_result"; +const std::string APP_INSTALL_EVENT = "PKG_INSTALL"; +const std::string APP_DELETE_EVENT = "PKG_UNINSTALL"; +const std::string APP_VERIFY_EVENT = "PKG_VERIFY_RESULT"; } namespace EventParamKey { -const std::string APP_ID = "app_id"; -const std::string BUNDLE_NAME = "bundle_name"; -const std::string VERIFY_STATUS = "verify_status"; -const std::string VERIFY_WAY = "verify_way"; +const std::string APP_ID = "APP_ID"; +const std::string BUNDLE_NAME = "BUNDLE_NAME"; +const std::string VERIFY_STATUS = "VERIFY_STATUS"; +const std::string VERIFY_WAY = "VERIFY_WAY"; } typedef enum EnumTaskType { IMMEDIATE_TASK, diff --git a/hisysevent.yaml b/hisysevent.yaml new file mode 100644 index 0000000..a33b041 --- /dev/null +++ b/hisysevent.yaml @@ -0,0 +1,34 @@ +# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +domain: APPDOMAINVERIFY + +################################################################################ +# BEHAVIOR EVENT # +################################################################################ +PKG_INSTALL: + __BASE: {type: BEHAVIOR, level: MINOR, desc: pkg install} + BUNDLE_NAME: {type: STRING, desc: bundleName} + APP_ID: {type: STRING, desc: appId} + +PKG_UNINSTALL: + __BASE: {type: BEHAVIOR, level: MINOR, desc: pkg uninstall} + BUNDLE_NAME: {type: STRING, desc: bundleName} + APP_ID: {type: STRING, desc: appId} + +PKG_VERIFY_RESULT: + __BASE: {type: BEHAVIOR, level: MINOR, desc: pkg verify result} + BUNDLE_NAME: {type: STRING, desc: bundleName} + APP_ID: {type: STRING, desc: appId} + VERIFY_WAY: {type: INT32, desc: verify way} + VERIFY_RESULT: {type: INT32, desc: verify result} \ No newline at end of file