From 31689896ee8cef5fc17a1f37183bdd5ac061a8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=BA=E9=B9=8F?= Date: Thu, 21 Nov 2024 19:44:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A2=9E=E5=8A=A0=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王智鹏 --- example/ohos/entry/src/main/module.json5 | 21 ++++++++++++++++++++- ohos/src/main/module.json5 | 9 --------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/example/ohos/entry/src/main/module.json5 b/example/ohos/entry/src/main/module.json5 index 5e0b06a..3baf6e6 100644 --- a/example/ohos/entry/src/main/module.json5 +++ b/example/ohos/entry/src/main/module.json5 @@ -47,7 +47,26 @@ } ], "requestPermissions": [ - {"name" : "ohos.permission.INTERNET"}, + { + "name": "ohos.permission.INTERNET", + "usedScene": { + "abilities": [ + "EntryAbility" + ], + "when": "inuse" + }, + "reason": "$string:module_desc" + }, + { + "name": "ohos.permission.CAMERA", + "usedScene": { + "abilities": [ + "EntryAbility" + ], + "when": "inuse" + }, + "reason": "$string:module_desc" + } ] } } \ No newline at end of file diff --git a/ohos/src/main/module.json5 b/ohos/src/main/module.json5 index 1ccc0ea..b4c1c99 100644 --- a/ohos/src/main/module.json5 +++ b/ohos/src/main/module.json5 @@ -4,15 +4,6 @@ "type": "har", "deviceTypes": [ "default", - ], - "requestPermissions": [ - { - "name": "ohos.permission.CAMERA", - "reason": "$string:request_perm", - "usedScene": { - "when": "inuse" - } - } ] }, } \ No newline at end of file -- Gitee