diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index 921a42426cbca31ad9ef1f23dc7481005ffbaddb..7af490d12f738a5de46348ef80862aa2ba51b39c 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -61,7 +61,15 @@ ], "requestPermissions": [ { - "name": "ohos.permission.COMMONEVENT_STICKY" + "name": "ohos.permission.COMMONEVENT_STICKY", + "reason": "$string:reason_common_event_sticky", + "usedScene": { + "abilities": [ + "MainAbility", + "LauncherAbility" + ], + "when": "always" + } } ] } diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index 4bb9fe46941d43f72dd80f4e1478d88ed4189666..fe9e7df137385cb75038d9e895dbbf9371713b93 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -115,6 +115,10 @@ { "name": "total_interrupt", "value": "干扰次数:" + }, + { + "name": "reason_common_event_sticky", + "value": "Allow the app to publish sticky public events in common event listening scenarios" } ] } \ No newline at end of file diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..524610ebadbefdd4af7302f270fee9ebf47ebce5 --- /dev/null +++ b/entry/src/main/resources/en_US/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "reason_common_event_sticky", + "value": "Allow the app to publish sticky public events in common event listening scenarios" + } + ] +} \ No newline at end of file diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..bb3aa42bcb17e8900b650710239065df94a5ca8d --- /dev/null +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "reason_common_event_sticky", + "value": "允许应用在公共事件监听场景中发布粘性公共事件" + } + ] +} \ No newline at end of file