mirror of
https://gitee.com/openharmony/notification_common_event_service
synced 2024-11-23 16:10:07 +00:00
事件通知sa权限最小化增加开关和etc
Signed-off-by: xinking129 <xinxin13@huawei.com>
This commit is contained in:
parent
34edefc90b
commit
6c748ad4e7
@ -86,6 +86,8 @@ ohos_shared_library("cesfwk_services") {
|
||||
"${ces_core_path}:cesfwk_core",
|
||||
"${ces_extension_path}:static_subscriber_ipc",
|
||||
"${ces_native_path}:cesfwk_innerkits",
|
||||
"../services:ces.para",
|
||||
"../services:ces.para.dac",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
@ -181,3 +183,17 @@ ohos_static_library("cesfwk_services_static") {
|
||||
subsystem_name = "notification"
|
||||
part_name = "common_event_service"
|
||||
}
|
||||
|
||||
ohos_prebuilt_etc("ces.para") {
|
||||
source = "etc/ces.para"
|
||||
relative_install_dir = "param"
|
||||
subsystem_name = "notification"
|
||||
part_name = "common_event_service"
|
||||
}
|
||||
|
||||
ohos_prebuilt_etc("ces.para.dac") {
|
||||
source = "etc/ces.para.dac"
|
||||
relative_install_dir = "param"
|
||||
subsystem_name = "notification"
|
||||
part_name = "common_event_service"
|
||||
}
|
||||
|
15
services/etc/ces.para
Normal file
15
services/etc/ces.para
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2023 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.
|
||||
|
||||
|
||||
notification.ces.check.sa.permission=false
|
14
services/etc/ces.para.dac
Normal file
14
services/etc/ces.para.dac
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2023 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.
|
||||
|
||||
notification.ces.check.sa.permission=foundation:ddms:02770
|
@ -33,7 +33,7 @@
|
||||
namespace OHOS {
|
||||
namespace EventFwk {
|
||||
namespace {
|
||||
const std::string NOTIFICATION_SUPPORT_CHECK_SA_PERMISSION = "notification.support.check.sa.permission";
|
||||
const std::string NOTIFICATION_CES_CHECK_SA_PERMISSION = "notification.ces.check.sa.permission";
|
||||
} // namespace
|
||||
|
||||
using namespace OHOS::Notification;
|
||||
@ -43,7 +43,7 @@ CommonEventManagerService::CommonEventManagerService()
|
||||
runner_(nullptr),
|
||||
handler_(nullptr)
|
||||
{
|
||||
supportCheckSaPermission_ = OHOS::system::GetParameter(NOTIFICATION_SUPPORT_CHECK_SA_PERMISSION, "false");
|
||||
supportCheckSaPermission_ = OHOS::system::GetParameter(NOTIFICATION_CES_CHECK_SA_PERMISSION, "false");
|
||||
EVENT_LOGD("instance created");
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
namespace OHOS {
|
||||
namespace EventFwk {
|
||||
namespace {
|
||||
const std::string NOTIFICATION_SUPPORT_CHECK_SA_PERMISSION = "notification.support.check.sa.permission";
|
||||
const std::string NOTIFICATION_CES_CHECK_SA_PERMISSION = "notification.ces.check.sa.permission";
|
||||
} // namespace
|
||||
|
||||
static const int32_t PUBLISH_SYS_EVENT_INTERVAL = 10; // 10s
|
||||
@ -43,7 +43,7 @@ static const int32_t PUBLISH_SYS_EVENT_INTERVAL = 10; // 10s
|
||||
InnerCommonEventManager::InnerCommonEventManager() : controlPtr_(std::make_shared<CommonEventControlManager>()),
|
||||
staticSubscriberManager_(std::make_shared<StaticSubscriberManager>())
|
||||
{
|
||||
supportCheckSaPermission_ = OHOS::system::GetParameter(NOTIFICATION_SUPPORT_CHECK_SA_PERMISSION, "false");
|
||||
supportCheckSaPermission_ = OHOS::system::GetParameter(NOTIFICATION_CES_CHECK_SA_PERMISSION, "false");
|
||||
}
|
||||
|
||||
constexpr char HIDUMPER_HELP_MSG[] =
|
||||
|
Loading…
Reference in New Issue
Block a user