未验证 提交 9169a3b4 编写于 作者: O openharmony_ci 提交者: Gitee

!4177 【OpenHarmony开源贡献者计划2022】API相关格式及表达问题0520-b

Merge pull request !4177 from king_he/0520b
# Ability Access Control # Ability Access Control
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/> > **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import ## Modules to Import
...@@ -20,9 +20,9 @@ Creates an **AtManager** instance, which is used for ability access control. ...@@ -20,9 +20,9 @@ Creates an **AtManager** instance, which is used for ability access control.
**Return value** **Return value**
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| [AtManager](#atmanager) | **AtManager** instance obtained.| | [AtManager](#atmanager) | **AtManager** instance obtained. |
**Example** **Example**
...@@ -44,16 +44,16 @@ Checks whether an application has been granted the specified permission. This AP ...@@ -44,16 +44,16 @@ Checks whether an application has been granted the specified permission. This AP
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| -------- | ------------------- | ---- | ------------------------------------------ | | -------- | ------------------- | ---- | ------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to verify.| | permissionName | string | Yes | Name of the permission to verify. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| :------------ | :---------------------------------- | | :------------ | :---------------------------------- |
| Promise&lt;GrantStatus&gt; | Promise instance used to return the result.| | Promise&lt;GrantStatus&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -78,17 +78,17 @@ Grants a user granted permission to an application. This API uses a promise to r ...@@ -78,17 +78,17 @@ Grants a user granted permission to an application. This API uses a promise to r
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to grant.| | permissionName | string | Yes | Name of the permission to grant. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| :------------ | :---------------------------------- | | :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.| | Promise&lt;number&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -115,12 +115,12 @@ Grants a user granted permission to an application. This API uses an asynchronou ...@@ -115,12 +115,12 @@ Grants a user granted permission to an application. This API uses an asynchronou
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to grant.| | permissionName | string | Yes | Name of the permission to grant. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the result.| | callback | AsyncCallback&lt;number&gt; | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -145,17 +145,17 @@ Revokes a user granted permission given to an application. This API uses a promi ...@@ -145,17 +145,17 @@ Revokes a user granted permission given to an application. This API uses a promi
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to revoke.| | permissionName | string | Yes | Name of the permission to revoke. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| :------------ | :---------------------------------- | | :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.| | Promise&lt;number&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -181,12 +181,12 @@ Revokes a user granted permission given to an application. This API uses an asyn ...@@ -181,12 +181,12 @@ Revokes a user granted permission given to an application. This API uses an asyn
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to revoke.| | permissionName | string | Yes | Name of the permission to revoke. |
| permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. | | permissionFlag | number | Yes | Permission flag. The value **1** means that a dialog box will still be displayed after the user grants or denies the permission. The value **2** means that no dialog box will be displayed after the user grants or denies the permission. The value **3** means a system permission that cannot be changed. |
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the result.| | callback | AsyncCallback&lt;number&gt; | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -210,16 +210,16 @@ Obtains the flags of the specified permission of a given application. This API u ...@@ -210,16 +210,16 @@ Obtains the flags of the specified permission of a given application. This API u
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | --------- | ------------------- | ---- | ------------------------------------------------------------ |
| tokenID | number | Yes | ID of the application. | | tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to query.| | permissionName | string | Yes | Name of the permission to query. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| :------------ | :---------------------------------- | | :------------ | :---------------------------------- |
| Promise&lt;number&gt; | Promise instance used to return the result.| | Promise&lt;number&gt; | Promise used to return the result. |
**Example** **Example**
...@@ -238,7 +238,7 @@ Enumerates the permission grant states. ...@@ -238,7 +238,7 @@ Enumerates the permission grant states.
**System capability**: SystemCapability.Security.AccessToken **System capability**: SystemCapability.Security.AccessToken
| Name | Default Value | Description | | Name | Default Value | Description |
| ----------------------------- | ---------------------- | ----------------------- | | ----------------------------- | ---------------------- | ----------------------- |
| PERMISSION_DENIED | -1 | Permission denied. | | PERMISSION_DENIED | -1 | Permission denied. |
| PERMISSION_GRANTED | 0 | Permission granted. | | PERMISSION_GRANTED | 0 | Permission granted. |
# AbilityDelegatorRegistry # AbilityDelegatorRegistry
> **NOTE** > **NOTE**<br>
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import ## Modules to Import
...@@ -18,13 +17,13 @@ Enumerates the ability lifecycle states. ...@@ -18,13 +17,13 @@ Enumerates the ability lifecycle states.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name | Value | Description | | Name | Value | Description |
| ------------- | ---- | --------------------------- | | ------------- | ---- | --------------------------- |
| UNINITIALIZED | 0 | The ability is in an invalid state. | | UNINITIALIZED | 0 | The ability is in an invalid state. |
| CREATE | 1 | The ability is created.| | CREATE | 1 | The ability is created. |
| FOREGROUND | 2 | The ability is running in the foreground. | | FOREGROUND | 2 | The ability is running in the foreground. |
| BACKGROUND | 3 | The ability is running in the background. | | BACKGROUND | 3 | The ability is running in the background. |
| DESTROY | 4 | The ability is destroyed.| | DESTROY | 4 | The ability is destroyed. |
...@@ -38,9 +37,9 @@ Obtains the **AbilityDelegator** object of the application. ...@@ -38,9 +37,9 @@ Obtains the **AbilityDelegator** object of the application.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | | ------------------------------------------------------------ | ------------------------------------------------------------ |
| [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) object, which can be used to schedule functions related to the test framework.| | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) | [AbilityDelegator](js-apis-application-abilityDelegator.md#AbilityDelegator) object, which can be used to schedule functions related to the test framework. |
**Example** **Example**
...@@ -62,9 +61,9 @@ Obtains the **AbilityDelegatorArgs** object of the application. ...@@ -62,9 +61,9 @@ Obtains the **AbilityDelegatorArgs** object of the application.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | | ------------------------------------------------------------ | ------------------------------------------------------------ |
| [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) object, which can be used to obtain test parameters.| | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) | [AbilityDelegatorArgs](js-apis-application-abilityDelegatorArgs.md#AbilityDelegatorArgs) object, which can be used to obtain test parameters. |
**Example** **Example**
......
# AbilityRunningInfo # AbilityRunningInfo
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -25,14 +25,14 @@ abilitymanager.getAbilityRunningInfos((err,data) => { ...@@ -25,14 +25,14 @@ abilitymanager.getAbilityRunningInfos((err,data) => {
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| ability | ElementName | Yes| No| Information that matches an ability. | | ability | ElementName | Yes | No | Information that matches an ability. |
| pid | number | Yes| No| Process ID.| | pid | number | Yes | No | Process ID. |
| uid | number | Yes| No| User ID. | | uid | number | Yes | No | User ID. |
| processName | string | Yes| No| Process name. | | processName | string | Yes | No | Process name. |
| startTime | number | Yes| No| Ability start time. | | startTime | number | Yes | No | Ability start time. |
| abilityState | [abilityManager.AbilityState](#abilitymanagerabilitystate) | Yes| No| Ability state. | | abilityState | [abilityManager.AbilityState](#abilitymanagerabilitystate) | Yes | No | Ability state. |
## abilityManager.AbilityState ## abilityManager.AbilityState
...@@ -41,10 +41,10 @@ Enumerates the ability states. ...@@ -41,10 +41,10 @@ Enumerates the ability states.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Value| Description| | Name | Value | Description |
| -------- | -------- | -------- | | -------- | -------- | -------- |
| INITIAL | 0 | The ability is in the initial state.| | INITIAL | 0 | The ability is in the initial state. |
| FOREGROUND | 9 | The ability is in the foreground state. | | FOREGROUND | 9 | The ability is in the foreground state. |
| BACKGROUND | 10 | The ability is in the background state. | | BACKGROUND | 10 | The ability is in the background state. |
| FOREGROUNDING | 11 | The ability is in the foregrounding state. | | FOREGROUNDING | 11 | The ability is in the foregrounding state. |
| BACKGROUNDING | 12 | The ability is in the backgrounding state. | | BACKGROUNDING | 12 | The ability is in the backgrounding state. |
# AbilityStageContext # AbilityStageContext
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> 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 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.
...@@ -28,7 +28,7 @@ class MyAbilityStage extends AbilityStage { ...@@ -28,7 +28,7 @@ class MyAbilityStage extends AbilityStage {
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
| Name| Type| Readable| Writable| Description| | Name| Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| currentHapModuleInfo | HapModuleInfo | Yes| No| **ModuleInfo** object corresponding to the **AbilityStage**.| | currentHapModuleInfo | HapModuleInfo | Yes | No | **ModuleInfo** object corresponding to the **AbilityStage**. |
| config | [Configuration](js-apis-configuration.md) | Yes| No| Configuration for the environment where the application is running.| | config | [Configuration](js-apis-configuration.md) | Yes| No| Configuration for the environment where the application is running. |
# Animation<a name="EN-US_TOPIC_0000001127125026"></a> # Animation<a name="EN-US_TOPIC_0000001127125026"></a>
>![](../../public_sys-resources/icon-note.gif) **NOTE:** > **NOTE:**<br>
>The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import<a name="s0e7b1e85a4274f58a8206e0b065bd80c"></a> ## Modules to Import<a name="s0e7b1e85a4274f58a8206e0b065bd80c"></a>
......
# MissionSnapshot # MissionSnapshot
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -21,7 +21,7 @@ import { image } from '../@ohos.multimedia.image'; ...@@ -21,7 +21,7 @@ import { image } from '../@ohos.multimedia.image';
Describes the mission snapshot. Describes the mission snapshot.
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| ability | ElementName | Yes| Yes| Information that matches an ability.| | ability | ElementName | Yes | Yes | Information that matches an ability. |
| snapshot | [image.PixelMap](js-apis-image.md) | Yes| Yes| Snapshot of the mission.| | snapshot | [image.PixelMap](js-apis-image.md) | Yes| Yes| Snapshot of the mission. |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册