From f0c893f67baa0c370021de7c050b40ba0213dc37 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Thu, 2 Mar 2023 20:07:45 +0800 Subject: [PATCH] update docs Signed-off-by: Annie_wang --- .../reference/apis/js-apis-permissionrequestresult.md | 8 +++----- en/application-dev/security/permission-list.md | 8 ++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-permissionrequestresult.md b/en/application-dev/reference/apis/js-apis-permissionrequestresult.md index 03e049e9a1..ba926d9a60 100644 --- a/en/application-dev/reference/apis/js-apis-permissionrequestresult.md +++ b/en/application-dev/reference/apis/js-apis-permissionrequestresult.md @@ -4,8 +4,8 @@ The **PermissionRequestResult** module defines the result of a permission reques > **NOTE** > -> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. -> The APIs of this module can be used only in the stage model. +> - The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> - The APIs of this module can be used only in the stage model. ## Attributes @@ -14,7 +14,7 @@ The **PermissionRequestResult** module defines the result of a permission reques | Name| Type| Readable| Writable| Description| | -------- | -------- | -------- | -------- | -------- | | permissions | Array<string> | Yes| No| Permissions requested.| -| authResults | Array<number> | Yes| No| Whether the requested permissions are granted. The value **0** means that the requests permissions are granted, and a non-zero value means the opposite.| +| authResults | Array<number> | Yes| No|Resule of the permission Request.
**-1**: The permission has been set and no dialog box will be displayed. Users can modify the permission in **Settings**.
**0**: No operation is required.
**1**: Dynamic user authorization is required via a dialog window .
**2**: The request is invalid. Possible causes are as follows:
- The permission is not declared in the configuration file.
- The permission name is invalid.
- Special conditions for applying for the permission do not satisfied. See [ohos.permission.LOCATION](../../security/permission-list.md#ohospermissionlocation) and [ohos.permission.APPROXIMATELY_LOCATION](../../security/permission-list.md#ohospermissionapproximately_location).| ## Usage @@ -36,5 +36,3 @@ try { console.log(`catch err->${JSON.stringify(err)}`); } ``` - - \ No newline at end of file diff --git a/en/application-dev/security/permission-list.md b/en/application-dev/security/permission-list.md index 95587c618e..0258bc1d6e 100644 --- a/en/application-dev/security/permission-list.md +++ b/en/application-dev/security/permission-list.md @@ -76,7 +76,7 @@ Allows an application to read telephony information. ## ohos.permission.REQUIRE_FORM -Allows an application to obtain widgets. +Allows an application to obtain the Ability Form. **Permission level**: system_basic @@ -1144,6 +1144,8 @@ Allows an application to obtain the device location. **Enable via ACL**: TRUE +**Application conditions**: The applications developed using the SDK earlier than API version 9 can directly apply for this permission. For the applications developed using the SDK of API version 9 or later, you need to apply for [ohos.permission.APPROXIMATELY_LOCATION](#ohospermissionapproximately_location) before applying for this permission. + ## ohos.permission.APPROXIMATELY_LOCATION Allows an application to obtain the approximate location information of a device. @@ -1154,9 +1156,11 @@ Allows an application to obtain the approximate location information of a device **Enable via ACL**: FALSE +**Application conditions**: Only applications developed using the SDK of API version 9 or later can apply for this permission. + ## ohos.permission.MEDIA_LOCATION -Allow an application to access geographical locations in the user's media file. +Allows an application to access geographical locations in the user's media file. **Permission level**: normal -- GitLab