From e307e2ed82fd60d60f23a772e02fdbf2ab51d9f7 Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Sat, 2 Apr 2022 16:27:07 +0800 Subject: [PATCH] add template config file Signed-off-by: fangJinliang1 Change-Id: I73f0745f4761a8bffcc2bbee924dd71ea18e0a34 Signed-off-by: fangJinliang1 --- frameworks/ans/core/common/include/ans_const_define.h | 2 +- services/ans/BUILD.gn | 9 +++++++++ services/ans/resource/external.json | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 services/ans/resource/external.json diff --git a/frameworks/ans/core/common/include/ans_const_define.h b/frameworks/ans/core/common/include/ans_const_define.h index 9d842d285..fb7c01643 100644 --- a/frameworks/ans/core/common/include/ans_const_define.h +++ b/frameworks/ans/core/common/include/ans_const_define.h @@ -45,7 +45,7 @@ const static Uri DEFAULT_NOTIFICATION_SOUND("file://system/etc/Light.ogg"); const static std::vector DEFAULT_NOTIFICATION_VIBRATION = {200}; // Default path for template -const static std::string DEFAULT_TEMPLATE_PATH("/system/etc/NotificationTemplate/external.json"); +const static std::string DEFAULT_TEMPLATE_PATH("/system/etc/notification_template/external.json"); #ifdef DISTRIBUTED_NOTIFICATION_SUPPORTED constexpr NotificationConstant::DistributedReminderPolicy DEFAULT_DISTRIBUTED_REMINDER_POLICY = diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index 34a8673a5..5be34aa11 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -54,6 +54,7 @@ ohos_shared_library("libans") { defines = [] deps = [ + ":external.json", "${core_path}:ans_core", "${frameworks_path}/ans/dialog/dialog_ui/js:dialog_js_files_etc", "${frameworks_path}/ans/native:ans_innerkits", @@ -88,3 +89,11 @@ ohos_shared_library("libans") { subsystem_name = "notification" part_name = "ans_standard" } + +ohos_prebuilt_etc("external.json") { + source = + "//base/notification/ans_standard/services/ans/resource/external.json" + relative_install_dir = "notification_template" + subsystem_name = "notification" + part_name = "ans_standard" +} diff --git a/services/ans/resource/external.json b/services/ans/resource/external.json new file mode 100644 index 000000000..7eb2533f4 --- /dev/null +++ b/services/ans/resource/external.json @@ -0,0 +1,3 @@ +{ + "downloadTemplate": "/system/etc/notification_template/assets/js/downloadTemplate.js" +} \ No newline at end of file -- Gitee