From 94d7f072ac453e99a926634ad24c32390bb3d1e5 Mon Sep 17 00:00:00 2001 From: wf0304-gme <452399386@qq.com> Date: Thu, 20 Jul 2023 11:28:41 +0800 Subject: [PATCH] =?UTF-8?q?user=5Fgrant=E6=9D=83=E9=99=90=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wf0304-gme <452399386@qq.com> --- Media/VideoPlayer/entry/src/main/module.json5 | 21 ++++++++++++++++--- .../main/resources/base/element/string.json | 12 +++++++++++ .../main/resources/en_US/element/string.json | 12 +++++++++++ .../main/resources/zh_CN/element/string.json | 12 +++++++++++ .../entry/src/main/module.json5 | 7 ++++++- .../main/resources/base/element/string.json | 4 ++++ .../main/resources/en_US/element/string.json | 4 ++++ .../main/resources/zh_CN/element/string.json | 4 ++++ 8 files changed, 72 insertions(+), 4 deletions(-) diff --git a/Media/VideoPlayer/entry/src/main/module.json5 b/Media/VideoPlayer/entry/src/main/module.json5 index 4b0bd753..bf390bba 100644 --- a/Media/VideoPlayer/entry/src/main/module.json5 +++ b/Media/VideoPlayer/entry/src/main/module.json5 @@ -35,13 +35,28 @@ ], "requestPermissions": [ { - "name": "ohos.permission.READ_MEDIA" + "name": "ohos.permission.READ_MEDIA", + "reason": "$string:reason_read", + "usedScene": { + "abilities": ["EntryAbility"], + "when": "inuse" + } }, { - "name": "ohos.permission.MEDIA_LOCATION" + "name": "ohos.permission.MEDIA_LOCATION", + "reason": "$string:reason_location", + "usedScene": { + "abilities": ["EntryAbility"], + "when": "inuse" + } }, { - "name": "ohos.permission.INTERNET" + "name": "ohos.permission.INTERNET", + "reason": "$string:reason_internet", + "usedScene": { + "abilities": ["EntryAbility"], + "when": "inuse" + } } ] } diff --git a/Media/VideoPlayer/entry/src/main/resources/base/element/string.json b/Media/VideoPlayer/entry/src/main/resources/base/element/string.json index e3fdc61b..9d01b62f 100644 --- a/Media/VideoPlayer/entry/src/main/resources/base/element/string.json +++ b/Media/VideoPlayer/entry/src/main/resources/base/element/string.json @@ -87,6 +87,18 @@ { "name": "place_holder_name", "value": "Please enter a file name" + }, + { + "name": "reason_read", + "value": "Reading Local Videos." + }, + { + "name": "reason_location", + "value": "Obtaining Local Videos." + }, + { + "name": "reason_internet", + "value": "Network video rights." } ] } \ No newline at end of file diff --git a/Media/VideoPlayer/entry/src/main/resources/en_US/element/string.json b/Media/VideoPlayer/entry/src/main/resources/en_US/element/string.json index 734eace7..96ebf8c0 100644 --- a/Media/VideoPlayer/entry/src/main/resources/en_US/element/string.json +++ b/Media/VideoPlayer/entry/src/main/resources/en_US/element/string.json @@ -87,6 +87,18 @@ { "name": "place_holder_name", "value": "Please enter a file name" + }, + { + "name": "reason_read", + "value": "Reading Local Videos." + }, + { + "name": "reason_location", + "value": "Obtaining Local Videos." + }, + { + "name": "reason_internet", + "value": "Network video rights." } ] } \ No newline at end of file diff --git a/Media/VideoPlayer/entry/src/main/resources/zh_CN/element/string.json b/Media/VideoPlayer/entry/src/main/resources/zh_CN/element/string.json index c4cf0998..c5c51e96 100644 --- a/Media/VideoPlayer/entry/src/main/resources/zh_CN/element/string.json +++ b/Media/VideoPlayer/entry/src/main/resources/zh_CN/element/string.json @@ -87,6 +87,18 @@ { "name": "place_holder_name", "value": "请输入文件名称" + }, + { + "name": "reason_read", + "value": "本地媒体读取权限" + }, + { + "name": "reason_location", + "value": "获取本地视频" + }, + { + "name": "reason_internet", + "value": "获取网络权限" } ] } \ No newline at end of file diff --git a/Security/AccessPermission/entry/src/main/module.json5 b/Security/AccessPermission/entry/src/main/module.json5 index b11676ac..5e667626 100644 --- a/Security/AccessPermission/entry/src/main/module.json5 +++ b/Security/AccessPermission/entry/src/main/module.json5 @@ -34,7 +34,12 @@ ], "requestPermissions": [ { - "name" : "ohos.permission.DISTRIBUTED_DATASYNC" + "name" : "ohos.permission.DISTRIBUTED_DATASYNC", + "reason": "$string:reason", + "usedScene": { + "abilities": ["EntryAbility"], + "when": "inuse" + } } ] } diff --git a/Security/AccessPermission/entry/src/main/resources/base/element/string.json b/Security/AccessPermission/entry/src/main/resources/base/element/string.json index 6ba4bca1..5397cc82 100644 --- a/Security/AccessPermission/entry/src/main/resources/base/element/string.json +++ b/Security/AccessPermission/entry/src/main/resources/base/element/string.json @@ -43,6 +43,10 @@ { "name": "clear_permission", "value": "To apply for a new permission, go to Settings > Applications > App Management > Application name > Storage > Delete data and clear the cache." + }, + { + "name": "reason", + "value": "Querying Peripheral Untrusted Devices." } ] } \ No newline at end of file diff --git a/Security/AccessPermission/entry/src/main/resources/en_US/element/string.json b/Security/AccessPermission/entry/src/main/resources/en_US/element/string.json index 6ba4bca1..5397cc82 100644 --- a/Security/AccessPermission/entry/src/main/resources/en_US/element/string.json +++ b/Security/AccessPermission/entry/src/main/resources/en_US/element/string.json @@ -43,6 +43,10 @@ { "name": "clear_permission", "value": "To apply for a new permission, go to Settings > Applications > App Management > Application name > Storage > Delete data and clear the cache." + }, + { + "name": "reason", + "value": "Querying Peripheral Untrusted Devices." } ] } \ No newline at end of file diff --git a/Security/AccessPermission/entry/src/main/resources/zh_CN/element/string.json b/Security/AccessPermission/entry/src/main/resources/zh_CN/element/string.json index 06540523..c41a81ef 100644 --- a/Security/AccessPermission/entry/src/main/resources/zh_CN/element/string.json +++ b/Security/AccessPermission/entry/src/main/resources/zh_CN/element/string.json @@ -43,6 +43,10 @@ { "name": "clear_permission", "value": "如需重新申请权限,请在设置-应用-应用管理-应用名-存储-删除数据、清空缓存" + }, + { + "name": "reason", + "value": "查询周边不可信设备" } ] } \ No newline at end of file -- Gitee