Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xugenyuan
2024-05-15 14:07:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
95ee904dad61ddda55f9e313c62b5c30b9aafd40
95ee904d
1 parent
26893a63
ref |> 修改系统相册、相机、定位、麦克风权限设置字串
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
15 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/PrivacySettingPage.ets
sight_harmony/products/phone/src/main/module.json5
sight_harmony/products/phone/src/main/resources/base/element/string.json
sight_harmony/features/wdComponent/src/main/ets/components/page/PrivacySettingPage.ets
View file @
95ee904
...
...
@@ -67,16 +67,17 @@ export struct PrivacySettingPage {
getArrowCell({ item:item, index:index });
}
}.onClick(() => {
if (index != 0) {
if (!item.permission) {
//跳转权限设置
const permissionUtil = new PermissionUtil();
PermissionUtil.reqPermissionsFromUser([item.permissionKey], this).then((res)=>{
item.permission = res;
});
}else{
PermissionUtil.openPermissionsInSystemSettings(this);
}
if (item.privacyName == DiyString) {
return
}
if (!item.permission) {
//跳转权限设置
const permissionUtil = new PermissionUtil();
PermissionUtil.reqPermissionsFromUser([item.permissionKey], this).then((res)=>{
item.permission = res;
});
}else{
PermissionUtil.openPermissionsInSystemSettings(this);
}
})
})
...
...
sight_harmony/products/phone/src/main/module.json5
View file @
95ee904
...
...
@@ -41,7 +41,7 @@
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.CAMERA"
,
"reason"
:
"$string:
EntryAbility_desc
"
,
"reason"
:
"$string:
permission_camera_tip
"
,
"usedScene"
:
{
"abilities"
:
[
"FormAbility"
...
...
@@ -51,7 +51,7 @@
},
{
"name"
:
"ohos.permission.READ_MEDIA"
,
"reason"
:
"$string:
EntryAbility_desc
"
,
"reason"
:
"$string:
permission_photo_tip
"
,
"usedScene"
:
{
"abilities"
:
[
"FormAbility"
...
...
@@ -61,7 +61,7 @@
},
{
"name"
:
"ohos.permission.WRITE_MEDIA"
,
"reason"
:
"$string:
EntryAbility_desc
"
,
"reason"
:
"$string:
permission_photo_tip
"
,
"usedScene"
:
{
"abilities"
:
[
"FormAbility"
...
...
@@ -71,7 +71,7 @@
},
{
"name"
:
"ohos.permission.APPROXIMATELY_LOCATION"
,
"reason"
:
"$string:
EntryAbility_desc
"
,
"reason"
:
"$string:
permission_location_tip
"
,
"usedScene"
:
{
"abilities"
:
[
"FormAbility"
...
...
@@ -81,7 +81,7 @@
},
{
"name"
:
"ohos.permission.MICROPHONE"
,
"reason"
:
"$string:
EntryAbility_desc
"
,
"reason"
:
"$string:
permission_microphone_tip
"
,
"usedScene"
:
{
"abilities"
:
[
"FormAbility"
...
...
sight_harmony/products/phone/src/main/resources/base/element/string.json
View file @
95ee904
...
...
@@ -13,6 +13,22 @@
"value"
:
"$string:app_name"
},
{
"name"
:
"permission_photo_tip"
,
"value"
:
"开启之后即可用于保存新闻图片到相册、发视频、设置封面、设置头像、缓存图片和视频来展示内容等功能"
},
{
"name"
:
"permission_camera_tip"
,
"value"
:
"开启之后即可用于拍摄视频、拍摄头像、扫一扫功能"
},
{
"name"
:
"permission_location_tip"
,
"value"
:
"开启之后可为你推荐你可能感兴趣的内容及附近的相关信息,以提升浏览体验。不授权该权限不影响APP正常使用。"
},
{
"name"
:
"permission_microphone_tip"
,
"value"
:
"开启之后即可用于收录声音进行拍摄视频、语音搜索、语音评论功能,"
},
{
"name"
:
"dialog_text_title"
,
"value"
:
"个人隐私保护指引"
},
...
...
Please
register
or
login
to post a comment