From b2527297f04682896e5ec0abfe003a85b30055c8 Mon Sep 17 00:00:00 2001 From: houyoujin Date: Fri, 23 Feb 2024 17:50:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9module.json5=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houyoujin --- entry/src/main/module.json5 | 28 ++++++++++++++++--- .../main/resources/base/element/string.json | 4 +++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index fb065de..0548be5 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -41,16 +41,36 @@ ], "requestPermissions": [ { - "name": "ohos.permission.INTERNET" + "name": "ohos.permission.INTERNET", + "reason":"$string:reason", + "usedScene": { + "abilities": ["EntryAbility"], + "when": "always" + } }, { - "name": "ohos.permission.WRITE_MEDIA" + "name": "ohos.permission.WRITE_MEDIA", + "reason":"$string:reason", + "usedScene": { + "abilities": ["EntryAbility"], + "when": "always" + } }, { - "name": "ohos.permission.GET_NETWORK_INFO" + "name": "ohos.permission.GET_NETWORK_INFO", + "reason":"$string:reason", + "usedScene": { + "abilities": ["EntryAbility"], + "when": "always" + } }, { - "name": "ohos.permission.READ_MEDIA" + "name": "ohos.permission.READ_MEDIA", + "reason":"$string:reason", + "usedScene": { + "abilities": ["EntryAbility"], + "when": "always" + } }, ] } diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index 9a69ede..352b30a 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -11,6 +11,10 @@ { "name": "MainAbility_label", "value": "commons-fileupload" + }, + { + "name": "reason", + "value": "三方库权限依赖" } ] } \ No newline at end of file -- Gitee