From 10de2461ebd20a25804559e34477f19817f81717 Mon Sep 17 00:00:00 2001 From: zwx1126739 Date: Tue, 18 Jun 2024 17:08:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=87=E5=BF=98=E5=BD=95?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E5=9B=BE=E7=89=87=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zwx1126739 --- .../ets/components/NoteContentCompPortrait.ets | 4 ++-- product/default/src/main/module.json5 | 15 ++++++--------- .../src/main/resources/base/element/string.json | 12 ++++++------ .../src/main/resources/zh_CN/element/string.json | 12 ++++++------ 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/features/src/main/ets/components/NoteContentCompPortrait.ets b/features/src/main/ets/components/NoteContentCompPortrait.ets index fec567f..e5ef28d 100644 --- a/features/src/main/ets/components/NoteContentCompPortrait.ets +++ b/features/src/main/ets/components/NoteContentCompPortrait.ets @@ -197,8 +197,8 @@ export struct NoteContentCompPortrait { }, openAlbum: async () => { let permissionList: Array = [ - "ohos.permission.READ_MEDIA", - "ohos.permission.WRITE_MEDIA", + "ohos.permission.READ_IMAGEVIDEO", + "ohos.permission.WRITE_IMAGEVIDEO" ] let context: any = AppStorage.Get("context"); let AtManager = abilityAccessCtrl.createAtManager(); diff --git a/product/default/src/main/module.json5 b/product/default/src/main/module.json5 index ab55ac2..55d5c36 100644 --- a/product/default/src/main/module.json5 +++ b/product/default/src/main/module.json5 @@ -29,14 +29,6 @@ { "name": "ohos.permission.INTERNET" }, - { - "name": "ohos.permission.READ_MEDIA", - "reason": "$string:read_media_permission" - }, - { - "name": "ohos.permission.WRITE_MEDIA", - "reason": "$string:write_media_permission" - }, { "name": "ohos.permission.MEDIA_LOCATION", "reason": "$string:media_location_permission" @@ -49,7 +41,12 @@ "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND" }, { - "name": "ohos.permission.READ_IMAGEVIDEO" + "name": "ohos.permission.READ_IMAGEVIDEO", + "reason": "$string:read_image_video_permission" + }, + { + "name": "ohos.permission.WRITE_IMAGEVIDEO", + "reason": "$string:write_image_video_permission" } ], "deliveryWithInstall": true, diff --git a/product/default/src/main/resources/base/element/string.json b/product/default/src/main/resources/base/element/string.json index 5a03f94..bcae607 100644 --- a/product/default/src/main/resources/base/element/string.json +++ b/product/default/src/main/resources/base/element/string.json @@ -4,10 +4,6 @@ "name": "entry_MainAbility", "value": "备忘录" }, - { - "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" @@ -17,8 +13,12 @@ "value": "Used for memo data exchange between different equipment" }, { - "name": "write_media_permission", - "value": "Used to write media file information in external storage of users" + "name": "read_image_video_permission", + "value": "Used to read images or video files from the user's public directory" + }, + { + "name": "write_image_video_permission", + "value": "Used to modify image or video files in the user's public directory" } ] } \ No newline at end of file diff --git a/product/default/src/main/resources/zh_CN/element/string.json b/product/default/src/main/resources/zh_CN/element/string.json index 2629b77..4d0096b 100644 --- a/product/default/src/main/resources/zh_CN/element/string.json +++ b/product/default/src/main/resources/zh_CN/element/string.json @@ -1,9 +1,5 @@ { "string": [ - { - "name": "read_media_permission", - "value": "用于备忘录读取用户外部存储中的媒体文件信息" - }, { "name": "media_location_permission", "value": "用于备忘录访问用户媒体文件中的地理位置信息" @@ -13,8 +9,12 @@ "value": "用于备忘录进行不同设备间的数据交换" }, { - "name": "write_media_permission", - "value": "用于备忘录记录用户外部存储中的图片文件信息" + "name": "read_image_video_permission", + "value": "用于备忘录读取用户公共目录的图片或视频文件" + }, + { + "name": "write_image_video_permission", + "value": "用于备忘录修改用户公共目录的图片或视频文件" } ] } \ No newline at end of file -- Gitee