From 8c30059e3daa43d490356c64f5b0d69041a1afd3 Mon Sep 17 00:00:00 2001 From: qp Date: Fri, 24 Jun 2022 17:08:40 +0800 Subject: [PATCH] Reason for modifying application permission Signed-off-by: qp --- product/phone/src/main/ets/pages/MyNoteHome.ets | 1 - product/phone/src/main/module.json5 | 12 ++++++------ .../src/main/resources/base/element/string.json | 16 ++++++++++++++++ .../src/main/resources/zh_CN/element/string.json | 16 ++++++++++++++++ product/tablet/src/main/module.json5 | 12 ++++++------ .../src/main/resources/base/element/string.json | 16 ++++++++++++++++ .../src/main/resources/zh_CN/element/string.json | 16 ++++++++++++++++ 7 files changed, 76 insertions(+), 13 deletions(-) create mode 100644 product/phone/src/main/resources/base/element/string.json create mode 100644 product/phone/src/main/resources/zh_CN/element/string.json create mode 100644 product/tablet/src/main/resources/base/element/string.json create mode 100644 product/tablet/src/main/resources/zh_CN/element/string.json diff --git a/product/phone/src/main/ets/pages/MyNoteHome.ets b/product/phone/src/main/ets/pages/MyNoteHome.ets index 65aca00..b98cdca 100644 --- a/product/phone/src/main/ets/pages/MyNoteHome.ets +++ b/product/phone/src/main/ets/pages/MyNoteHome.ets @@ -50,7 +50,6 @@ export struct MyNoteHomeComp { let permissionList: Array = [ "ohos.permission.READ_MEDIA", - "ohos.permission.WRITE_MEDIA", "ohos.permission.MEDIA_LOCATION", "ohos.permission.DISTRIBUTED_DATASYNC" ] diff --git a/product/phone/src/main/module.json5 b/product/phone/src/main/module.json5 index 6794925..2f360f8 100644 --- a/product/phone/src/main/module.json5 +++ b/product/phone/src/main/module.json5 @@ -25,16 +25,16 @@ ], "requestPermissions": [ { - "name": "ohos.permission.READ_MEDIA" + "name": "ohos.permission.READ_MEDIA", + "reason": "$string:read_media_permission" }, { - "name": "ohos.permission.WRITE_MEDIA" + "name": "ohos.permission.MEDIA_LOCATION", + "reason": "$string:media_location_permission" }, { - "name": "ohos.permission.MEDIA_LOCATION" - }, - { - "name": "ohos.permission.DISTRIBUTED_DATASYNC" + "name": "ohos.permission.DISTRIBUTED_DATASYNC", + "reason": "$string:distributed_dataSync_permission" }, ], "deliveryWithInstall": true, diff --git a/product/phone/src/main/resources/base/element/string.json b/product/phone/src/main/resources/base/element/string.json new file mode 100644 index 0000000..85dc25a --- /dev/null +++ b/product/phone/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "read_media_permission", + "value": "Used to read media file information in external storage of users" + }, + { + "name": "media_location_permission", + "value": "Used for memo access to geographic location information in user media files" + }, + { + "name": "distributed_dataSync_permission", + "value": "Used for memo data exchange between different equipment" + } + ] +} \ No newline at end of file diff --git a/product/phone/src/main/resources/zh_CN/element/string.json b/product/phone/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000..215a916 --- /dev/null +++ b/product/phone/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "read_media_permission", + "value": "用于备忘录读取用户外部存储中的媒体文件信息" + }, + { + "name": "media_location_permission", + "value": "用于备忘录访问用户媒体文件中的地理位置信息" + }, + { + "name": "distributed_dataSync_permission", + "value": "用于备忘录进行不同设备间的数据交换" + } + ] +} \ No newline at end of file diff --git a/product/tablet/src/main/module.json5 b/product/tablet/src/main/module.json5 index 3bba09c..a6b07eb 100644 --- a/product/tablet/src/main/module.json5 +++ b/product/tablet/src/main/module.json5 @@ -25,16 +25,16 @@ ], "requestPermissions": [ { - "name": "ohos.permission.READ_MEDIA" + "name": "ohos.permission.READ_MEDIA", + "reason": "$string:read_media_permission" }, { - "name": "ohos.permission.WRITE_MEDIA" + "name": "ohos.permission.MEDIA_LOCATION", + "reason": "$string:media_location_permission" }, { - "name": "ohos.permission.MEDIA_LOCATION" - }, - { - "name": "ohos.permission.DISTRIBUTED_DATASYNC" + "name": "ohos.permission.DISTRIBUTED_DATASYNC", + "reason": "$string:distributed_dataSync_permission" }, ], "deliveryWithInstall": true, diff --git a/product/tablet/src/main/resources/base/element/string.json b/product/tablet/src/main/resources/base/element/string.json new file mode 100644 index 0000000..85dc25a --- /dev/null +++ b/product/tablet/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "read_media_permission", + "value": "Used to read media file information in external storage of users" + }, + { + "name": "media_location_permission", + "value": "Used for memo access to geographic location information in user media files" + }, + { + "name": "distributed_dataSync_permission", + "value": "Used for memo data exchange between different equipment" + } + ] +} \ No newline at end of file diff --git a/product/tablet/src/main/resources/zh_CN/element/string.json b/product/tablet/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000..215a916 --- /dev/null +++ b/product/tablet/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "read_media_permission", + "value": "用于备忘录读取用户外部存储中的媒体文件信息" + }, + { + "name": "media_location_permission", + "value": "用于备忘录访问用户媒体文件中的地理位置信息" + }, + { + "name": "distributed_dataSync_permission", + "value": "用于备忘录进行不同设备间的数据交换" + } + ] +} \ No newline at end of file -- Gitee