提交 df05df20 编写于 作者: G Gloria

Update docs against 19911+19916+19922+19830+19791+19921

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 98022549
......@@ -63,8 +63,7 @@ The system matches the **action** attribute in the **want** parameter passed by
- If **action** in the passed **want** parameter is specified, and **actions** under **skills** of an application component is specified but does not contain **action** in the passed **want** parameter, the matching fails.
**Figure 1** Matching rules of action in the want parameter
![want-action](figures/want-action.png)
![want-action](figures/want-action.png)
### Matching Rules of entities in the want Parameter
......@@ -82,8 +81,7 @@ The system matches the **entities** attribute in the **want** parameter passed b
- If **entities** in the passed **want** parameter is specified, and **entities** under **skills** of an application component is specified but does not contain **entities** in the passed **want** parameter, the matching fails.
**Figure 2** Matching rules of entities in the want parameter
![want-entities](figures/want-entities.png)
![want-entities](figures/want-entities.png)
### Matching Rules of uri and type in the want Parameter
......@@ -100,6 +98,7 @@ There are four combinations of **uri** and **type** settings. The matching rules
- Only **uri** is specified in the **want** parameter.
- If the **uris** array under **skills** of an application component is unspecified, the matching fails.
- If the **uris** array under **skills** of an application component contains an element whose [uri is matched](#matching-rules-of-uri) and **type** is unspecified, the matching is successful. Otherwise, the matching fails.
- If the matching fails for the preceding two scenarios and the input URI is a file path URI, the system obtains the MIME type of the file based on the file name extension. If the MIME type matches **type** configured under **skills**, the matching is successful.
- Only **type** is specified in the **want** parameter.
- If the **uris** array under **skills** of an application component is unspecified, the matching fails.
......@@ -112,8 +111,7 @@ There are four combinations of **uri** and **type** settings. The matching rules
Leftmost URI matching: When only **scheme**, a combination of **scheme** and **host**, or a combination of **scheme**, **host**, and **port** is configured in the **uris** array under **skills** of the application component, the matching is successful only if the leftmost URI in the passed **want** parameter matches **scheme**, the combination of **scheme** and **host**, or the combination of **scheme**, **host**, and **port**.
**Figure 3** Matching rules when uri and type are specified in the want parameter
![want-uri-type1](figures/want-uri-type1.png)
![want-uri-type1](figures/want-uri-type1.png)
To simplify the description:
......@@ -121,8 +119,7 @@ To simplify the description:
- **type** in the **want** parameter passed in by the caller is called **w_type**; the type in the **uris** array under **skills** of the application component to match is called **s_type**.
**Figure 4** Matching rules of uri and type in the want parameter
![want-uri-type2](figures/want-uri-type2.png)
![want-uri-type2](figures/want-uri-type2.png)
### Matching Rules of uri
......
......@@ -2,7 +2,7 @@
## Overview
[ServiceExtensionAbility](../reference/apis/js-apis-app-ability-serviceExtensionAbility.md) is an ExtensionAbility component of the service type that provides capabilities related to background services. It holds an internal [ServiceExtensionContext](../reference/apis/js-apis-inner-application-serviceExtensionContext.md), which provides a variety of APIs are provided for external systems.
[ServiceExtensionAbility](../reference/apis/js-apis-app-ability-serviceExtensionAbility.md) is an ExtensionAbility component of the service type that provides capabilities related to background services. It holds an internal [ServiceExtensionContext](../reference/apis/js-apis-inner-application-serviceExtensionContext.md), which provides a variety of APIs for external systems.
In this document, the started ServiceExtensionAbility is called the server, and the component that starts the ServiceExtensionAbility is called the client.
......@@ -28,7 +28,7 @@ Note the following:
## Lifecycle
The [ServiceExtensionAbility](../reference/apis/js-apis-app-ability-serviceExtensionAbility.md) class provides the lifecycle callbacks **onCreate()**, **onRequest()**, **onConnect()**, **onDisconnect()**, and **onDestory()**. Override them as required. The following figure shows the ServiceExtensionAbility lifecycle.
The [ServiceExtensionAbility](../reference/apis/js-apis-app-ability-serviceExtensionAbility.md) class provides the lifecycle callbacks **onCreate()**, **onRequest()**, **onConnect()**, **onDisconnect()**, and **onDestroy()**. Override them as required. The following figure shows the ServiceExtensionAbility lifecycle.
**Figure 1** ServiceExtensionAbility lifecycle
![ServiceExtensionAbility-lifecycle](figures/ServiceExtensionAbility-lifecycle.png)
......@@ -249,7 +249,6 @@ A system application uses the [startServiceExtensionAbility()](../reference/apis
>
> - The background service calls the [terminateSelf()](../reference/apis/js-apis-inner-application-serviceExtensionContext.md#serviceextensioncontextterminateself) method to automatically stop itself.
> - Another component calls the [stopServiceExtensionAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#abilitycontextstopserviceextensionability) method to stop the background service.
>
## Connecting to a Background Service
......@@ -382,7 +381,7 @@ When a ServiceExtensionAbility is used to provide sensitive services, the client
- **Verifying the client identity based on callerUid**
Call the [getCallingUid()](../reference/apis/js-apis-rpc.md#getcallinguid) method to obtain the UID of the client, and then call the [getBundleNameByUid()](../reference/apis/js-apis-bundleManager.md#bundlemanagergetbundlenamebyuid) method to obtain the corresponding bundle name. In this way, the client identify is verified. Note that [getBundleNameByUid()](../reference/apis/js-apis-bundleManager.md#bundlemanagergetbundlenamebyuid) is asynchronous, and therefore the server cannot return the verification result to the client. This verification mode applies when the client sends an asynchronous task request to the server. The sample code is as follows:
Call the [getCallingUid()](../reference/apis/js-apis-rpc.md#getcallinguid) method to obtain the UID of the client, and then call the [getBundleNameByUid()](../reference/apis/js-apis-bundleManager.md#bundlemanagergetbundlenamebyuid) method to obtain the corresponding bundle name. In this way, the client identity is verified. Note that [getBundleNameByUid()](../reference/apis/js-apis-bundleManager.md#bundlemanagergetbundlenamebyuid) is asynchronous, and therefore the server cannot return the verification result to the client. This verification mode applies when the client sends an asynchronous task request to the server. The sample code is as follows:
```ts
import rpc from '@ohos.rpc';
......
......@@ -36,6 +36,7 @@ Provides the detailed information of the permissions to request from the system.
| Name | Type | Readable| Writable| Description |
| --------------------- | ----------------------- | ---- | ---- | ---------------------|
| name | string | Yes | Yes | Name of the permission to request. |
| moduleName<sup>10+</sup> | string | Yes | Yes | Name of the module that requests the permission. |
| reason | string | Yes | Yes | Reason for requesting the permission. |
| reasonId | number | Yes | Yes | ID of the reason for requesting the permission.|
| usedScene | [UsedScene](#usedscene) | Yes | Yes | Application scenario and timing for using the permission.|
......
......@@ -719,9 +719,8 @@ Failed to install the HAP because the isolationMode configured is not supported.
During application installation, the value of **isolationMode** in the HAP conflicts with the isolation mode of the device.
**Possible Causes**
1. The device supports the isolation mode (the value of **supportIsolationMode** is **true**), whereas the value of **isolationMode** in the HAP is **nonisolationOnly**.
2. The device does not support the isolation mode (the value of **supportIsolationMode** is **false**), whereas the value of **isolationMode** in the HAP is **isolationOnly**.
1. The device supports the isolation mode (the value of **persist.bms.supportIsolationMode** is **true**), whereas the value of **isolationMode** in the HAP is **nonisolationOnly**.
2. The device does not support the isolation mode (the value of **persist.bms.supportIsolationMode** is **false**), whereas the value of **isolationMode** in the HAP is **isolationOnly**.
**Solution**
......@@ -764,3 +763,24 @@ The version of the application to be updated is not later than the current versi
1. Set the version number of the application to be later than the current version number.
2. If you want to update the application without changing the version number, set **installFlag** to **REPLACE_EXISTING**.
## 17700048 Code Signature Verification Failure
**Error Message**
Failed to install the HAP because the code signature verification is failed.
**Description**
During application installation, the code signature file of the installation package fails to be verified.
**Possible Causes**
1. The module corresponding to the code signature file does not exist in the installation package.
2. The path of the code signature file is invalid.
3. The code signature file does not match the installation package.
**Solution**
1. Ensure that the module corresponding to the code signature file is contained in the installation package.
2. Provide a valid path of the code signature file.
3. Use the code signature file that matches the installation package.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册