Parameters
@@ -219,23 +221,24 @@ Imports a key in plaintext.
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiImportWrappedKey
-**API description**
+**API Description**
Imports an encrypted key.
**Prototype**
int32_t HuksHdiImportWrappedKey(const struct HksBlob *keyAlias, const struct HksBlob *wrappingUsedkey, const struct HksBlob *wrappedKeyData, const struct HksParamSet *paramSet, struct HksBlob *keyOut);
+
Parameters
@@ -277,23 +280,24 @@ Imports an encrypted key.
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiExportPublicKey
-**API description**
+**API Description**
Exports a public key.
**Prototype**
int32_t HuksHdiExportPublicKey(const struct HksBlob *key, const struct HksParamSet *paramSet, struct HksBlob *keyOut);
+
Parameters
@@ -313,23 +317,24 @@ Exports a public key.
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiInit
-**API description**
+**API Description**
Initializes data for a key operation. This API is of the Init-Update-Final model.
**Prototype**
int32_t HuksHdiInit(const struct HksBlob *key, const struct HksParamSet *paramSet, struct HksBlob *handle, struct HksBlob *token);
+
Parameters
@@ -352,23 +357,24 @@ Initializes data for a key operation. This API is of the Init-Update-Final model
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiUpdate
-**API description**
+**API Description**
Operates data by segment or appends data for the key operation. This API is of the Init-Update-Final model.
**Prototype**
int32_t HuksHdiUpdate(const struct HksBlob *handle, const struct HksParamSet *paramSet, const struct HksBlob *inData, struct HksBlob *outData);
+
Parameters
@@ -396,23 +402,24 @@ Operates data by segment or appends data for the key operation. This API is of t
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiFinish
-**API description**
+**API Description**
Finalizes the key operation. This API is of the Init-Update-Final model.
**Prototype**
int32_t HuksHdiFinish(const struct HksBlob *handle, const struct HksParamSet *paramSet, const struct HksBlob *inData, struct HksBlob *outData);
+
Parameters
@@ -440,23 +447,24 @@ Finalizes the key operation. This API is of the Init-Update-Final model.
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiAbort
-**API description**
+**API Description**
Aborts Init-Update-Finish. When an error occurs in any of the **Init**, **Update**, and **Finish** operations, call this API to terminate the use of the key.
**Prototype**
int32_t HuksHdiAbort(const struct HksBlob *handle, const struct HksParamSet *paramSet);
+
Parameters
@@ -470,23 +478,24 @@ Aborts Init-Update-Finish. When an error occurs in any of the **Init**, **Update
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiGetKeyProperties
-**API description**
+**API Description**
Obtains key properties.
**Prototype**
int32_t HuksHdiGetKeyProperties(const struct HksParamSet *paramSet, const struct HksBlob *key);
+
Parameters
@@ -500,23 +509,24 @@ Obtains key properties.
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiAttestKey
-**API description**
+**API Description**
Obtains the key certificate.
**Prototype**
int32_t (*HuksHdiAttestKey)(const struct HksBlob *key, const struct HksParamSet *paramSet, struct HksBlob *certChain);
+
Parameters
@@ -541,23 +551,24 @@ Obtains the key certificate.
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
#### HuksHdiExportChipsetPlatformPublicKey
-**API description**
+**API Description**
Exports the public key of a chipset key pair.
**Prototype**
int32_t (*HuksHdiExportChipsetPlatformPublicKey)(const struct HksBlob *salt, enum HksChipsetPlatformDecryptScene scene, struct HksBlob *publicKey);
+
Parameters
@@ -577,18 +588,51 @@ Exports the public key of a chipset key pair.
Constraints
1. The input parameter **salt** must be of 16 bytes, and the content of the last byte will be ignored and filled by HUKS based on **scene**.
+ Currently, the chipset key pairs of HUKS are implemented by software. An ECC P-256 key pair is hard-coded, and the **salt** value is ignored. That is, the derived keys are the same regardless of the **salt**. In the hardware-based implementation of chipset key pairs, **salt** is a factor used to derive the key. That is, the key pair derived varies with the **salt** value.
- Currently, the chipset key pairs of HUKS are implemented by software. An ECC P-256 key pair is hard-coded, and the **salt** value is ignored. That is, the derived keys are the same regardless of the **salt**. In the hardware-based implementation of chipset key pairs, **salt** is a factor used to derive the key. That is, the key pair derived varies with the **salt** value.
+
+
+
+
+ Return Value
+
+ - **HKS_SUCCESS**: The operation is successful.
+
+ - Other value: The operation failed.
+
+
+- - -
+
+#### HuksHdiUpgradeKey
+**API Description**
+
+Updates the key file when the key file version is earlier than the latest version.
+
+**Prototype**
+int32_t (*HuksHdiUpgradeKey)(const struct HksBlob *oldKey, const struct HksParamSet *paramSet, struct HksBlob *newKey);
+
+
+ Parameters
+
+ const struct HksBlob *oldKey
+ Key file data to update.
+
+ const struct HksParamSet *paramSet
+ Parameters for updating the key file data.
+
+ struct HksBlob *newKey
+ New key file data.
+
- Return value
+ Return Value
- **HKS_SUCCESS**: The operation is successful.
- - Other value: The operation fails.
+ - Other value: The operation failed.
- - -
@@ -599,15 +643,15 @@ The directory structure is as follows:
```undefined
// base/security/user_auth/services/huks_standard/huks_engine/main
-├── BUILD.gn # Build script
+├── BUILD.gn # Build script
├── core_dependency # Dependencies of the implementation
-└── core # Software implementation of the HUKS Core
- ├── BUILD.gn # Build script
+└── core # Software implementation of the HUKS Core
+ ├── BUILD.gn # Build script
├── include
└── src
├── hks_core_interfaces.c # Adaptation of the HDI to the HUKS Core
- └── hks_core_service.c # Specific implementation
- └── ... # Other function code
+ └── hks_core_service.c # Specific implementation
+ └── ... # Other function code
```
Init-Update-Finish must be used to implement HUKS Core APIs. The following provides the development procedure of Init-Update-Finish and sample code of the HUKS Core. You can refer to the following code to implement all HDI APIs.
diff --git a/en/device-dev/subsystems/subsys-thermal_charging_idle_state.md b/en/device-dev/subsystems/subsys-thermal_charging_idle_state.md
new file mode 100644
index 0000000000000000000000000000000000000000..a90cce407a05f26b2a1349561a5cdcf2f87411d0
--- /dev/null
+++ b/en/device-dev/subsystems/subsys-thermal_charging_idle_state.md
@@ -0,0 +1,128 @@
+# Charging Idle State Customization
+
+## Overview
+
+### Introduction
+
+By default, OpenHarmony provides the charging idle state feature. It determines whether a device is currently in the idle state according to a thermal level, battery level, charging state, and charging current of the device. A device in this state may execute some background intensive tasks. However, the conditions that determine the charging idle state vary according to product specifications. To address this issue, OpenHarmony provides the charging idle state customization function.
+
+### Constraints
+
+The configuration path for battery level customization is subject to the [configuration policy](https://gitee.com/openharmony/customization_config_policy). In this development guide, `/vendor` is used as an example of the configuration path. During actual development, you need to modify the customization path based on the product configuration policy.
+
+## How to Develop
+
+### Setting Up the Environment
+
+**Hardware requirements:**
+
+Development board running the standard system, for example, the DAYU200 or Hi3516D V300 open source suite.
+
+**Environment requirements:**
+
+For details about the requirements on the Linux environment, see [Quick Start](../quick-start/quickstart-overview.md).
+
+### Getting Started with Development
+
+The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568) as an example to illustrate charging idle state customization.
+
+1. Create the `thermal` folder in the product directory [/vendor/hihope/rk3568](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568).
+
+2. Create a target folder by referring to the [default folder of battery idle state configuration](https://gitee.com/openharmony/powermgr_thermal_manager/tree/master/services/native/profile), and install it in `//vendor/hihope/rk3568/thermal`. The content is as follows:
+
+ ```text
+ profile
+ ├── BUILD.gn
+ ├── thermal_service_config.xml
+ ```
+
+3. Write the custom `thermal_service_config.xml` file by referring to the [thermal_service_config.xml](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml) file in the default folder of charging idle state configuration. The following table describes the related configuration items.
+
+ **Table 1** Configuration items for the charging idle state
+
+ | Configuration Item| Description| Data Type| Value Range|
+ | -------- | -------- | -------- | -------- |
+ | thermallevel | Thermal level threshold| int | This field is defined based on the thermal level of a device. If the thermal level of a device is less than or equal to the threshold, the device is in the charging idle state.|
+ | soc | Battery level threshold| int | The value of this field ranges from 0 to 100. If the battery level of the device is greater than or equal to the specified threshold, the device is in the charging idle state.|
+ | charging | Charging status| int | The value **1** indicates that the battery is being charged, and the value **0** indicates the opposite.|
+ | current | Battery charging current threshold| int | When the battery charging current is greater than or equal to the specified threshold (in mA), the battery is in the charging idle state.|
+
+ ```shell
+
+ 1
+ 90
+ 1
+ 1000
+
+ ```
+
+4. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/BUILD.gn) file in the default folder of charging idle state configuration to pack the `thermal_service_config.xml` file to the `/vendor/etc/thermal_config` directory. The configuration is as follows:
+
+ ```shell
+ import("//build/ohos.gni") # Reference build/ohos.gni.
+
+ ohos_prebuilt_etc("thermal_service_config") {
+ source = "thermal_service_config.xml"
+ relative_install_dir = "thermal_config"
+ install_images = [ chipset_base_dir ] # Required configuration for installing the thermal_service_config.xml file in the vendor directory.
+ part_name = "product_rk3568" # Set part_name to product_rk3568 for subsequent build. You can change it as required.
+ }
+ ```
+
+5. Add the build target to `module_list` in [ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build) in the `/vendor/hihope/rk3568` directory. For example:
+
+ ```json
+ {
+ "parts": {
+ "product_rk3568": {
+ "module_list": [
+ "//vendor/hihope/rk3568/default_app_config:default_app_config",
+ "//vendor/hihope/rk3568/image_conf:custom_image_conf",
+ "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
+ "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
+ "//vendor/hihope/rk3568/etc:product_etc_conf",
+ "//vendor/hihope/rk3568/thermal/profile:thermal_service_config", // Add the configuration for building of thermal_service_config.
+ ]
+ }
+ },
+ "subsystem": "product_hihope"
+ }
+ ```
+ In the preceding code, `//vendor/hihope/rk3568/thermal/` is the folder path, `profile` is the folder name, and `thermal_hdf_config` is the build target.
+
+6. Build the customized version by referring to [Quick Start](../quick-start/quickstart-overview.md).
+
+ ```shell
+ ./build.sh --product-name rk3568 --ccache
+ ```
+
+7. Burn the customized version to the DAYU200 development board.
+
+### Debugging and Verification
+
+1. After startup, run the following command to launch the shell command line:
+ ```shell
+ hdc shell
+ ```
+
+2. Obtain the current charging idle state.
+ ```shell
+ hidumper -s 3303 -a -i
+ ```
+
+ The following is the reference charging idle state after customization:
+ ```shell
+ -------------------------------[ability]-------------------------------
+
+
+ ----------------------------------ThermalService---------------------------------
+ thermallevel: 1
+ soc: 100
+ charging: 1
+ current: 1000
+ ```
+
+## Reference
+During development, you can refer to the [default charging idle state configuration](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml).
+
+Packing path: `/vendor/etc/thermal_config/hdf`
diff --git a/en/device-dev/subsystems/subsys-thermal_control.md b/en/device-dev/subsystems/subsys-thermal_control.md
new file mode 100644
index 0000000000000000000000000000000000000000..a97216aae23fdecff45affb2b3ed9331c8f6d3b2
--- /dev/null
+++ b/en/device-dev/subsystems/subsys-thermal_control.md
@@ -0,0 +1,155 @@
+# Thermal Control Customization
+
+## Overview
+
+### Introduction
+
+By default, OpenHarmony provides the thermal control feature. If a device becomes overheated during usage, thermal control measures need to be taken for the device. For example, if the battery temperature is too high during charging, then thermal control needs to be applied to the charging device. However, thermal control varies according to product specifications. To address this issue, OpenHarmony provides the thermal control customization function.
+
+### Constraints
+
+The configuration path for battery level customization is subject to the [configuration policy](https://gitee.com/openharmony/customization_config_policy). In this development guide, `/vendor` is used as an example of the configuration path. During actual development, you need to modify the customization path based on the product configuration policy.
+
+## How to Develop
+
+### Setting Up the Environment
+
+**Hardware requirements:**
+
+Development board running the standard system, for example, the DAYU200 or Hi3516D V300 open source suite.
+
+**Environment requirements:**
+
+For details about the requirements on the Linux environment, see [Quick Start](../quick-start/quickstart-overview.md).
+
+### Getting Started with Development
+
+The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568) as an example to illustrate thermal control customization.
+
+1. Create the `thermal` folder in the product directory [/vendor/hihope/rk3568](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568).
+
+2. Create a target folder by referring to the [default thermal control configuration folder](https://gitee.com/openharmony/powermgr_thermal_manager/tree/master/services/native/profile), and install it in `//vendor/hihope/rk3568/thermal`. The content is as follows:
+
+ ```text
+ profile
+ ├── BUILD.gn
+ ├── thermal_service_config.xml
+ ```
+
+3. Write the custom `thermal_service_config.xml` file by referring to the [thermal_service_config.xml](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml) file in the default thermal control configuration folder. The following table describes the related configuration items.
+
+ **Table 1** Configuration items for thermal control
+
+ | Configuration Item| Configuration Item Description| Parameter| Parameter Description| Data Type|Value Range|
+ | -------- | -------- | -------- | -------- | -------- | -------- |
+ | name="cpu_big" | Big-core CPU control (big-core CPU frequency)| N/A| N/A| N/A| N/A|
+ | name="cpu_med" | Medium-core CPU control (medium-core CPU frequency)| N/A| N/A| N/A| N/A|
+ | name="cpu_lit" | Small-core CPU control (small-core CPU frequency)| N/A| N/A| N/A| N/A|
+ | name="gpu" | GPU control (GPU frequency)| N/A| N/A| N/A| N/A|
+ | name="lcd" | LCD control (screen brightness)| N/A| N/A| N/A| N/A|
+ | name="volume" | Sound control (volume)| uid | User ID| int | Product-specific|
+ | name="current" | Charging current control (charging current during fast charging and slow charging)| protocol | Supported charging protocols: fast charging (supercharge) and slow charging (buck)| string | sc or buck|
+ | name="current" | Charging current control | event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1|
+ | name="voltage" | Charging voltage control (charging voltage during fast charging and slow charging)| protocol | Supported charging protocols: fast charging (supercharge) and slow charging (buck)| string | sc or buck|
+ | name="voltage" | Charging voltage control | event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1|
+ | name="process_ctrl" | Process control (survival status of foreground and background processes)| event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1|
+ | name="shut_down" | Shutdown control (device shutdown)| event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1|
+ | name="thermallevel" | Thermal level control (thermal level reporting)| event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1|
+ | name="popup" | Pop-up window control (pop-up window display)| N/A| N/A| N/A| N/A|
+
+ ```shell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ```
+
+4. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/BUILD.gn) file in the default thermal control configuration folder to pack the `thermal_service_config.xml` file to the `/vendor/etc/thermal_config` directory. The configuration is as follows:
+
+ ```shell
+ import("//build/ohos.gni") # Reference build/ohos.gni.
+
+ ohos_prebuilt_etc("thermal_service_config") {
+ source = "thermal_service_config.xml"
+ relative_install_dir = "thermal_config"
+ install_images = [ chipset_base_dir ] # Required configuration for installing the thermal_service_config.xml file in the vendor directory.
+ part_name = "product_rk3568" # Set part_name to product_rk3568 for subsequent build. You can change it as required.
+ }
+ ```
+
+5. Add the build target to `module_list` in [ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build) in the `/vendor/hihope/rk3568` directory. For example:
+
+ ```json
+ {
+ "parts": {
+ "product_rk3568": {
+ "module_list": [
+ "//vendor/hihope/rk3568/default_app_config:default_app_config",
+ "//vendor/hihope/rk3568/image_conf:custom_image_conf",
+ "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
+ "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
+ "//vendor/hihope/rk3568/etc:product_etc_conf",
+ "//vendor/hihope/rk3568/thermal/profile:thermal_service_config", // Add the configuration for building of thermal_service_config.
+ ]
+ }
+ },
+ "subsystem": "product_hihope"
+ }
+ ```
+ In the preceding code, `//vendor/hihope/rk3568/thermal/` is the folder path, `profile` is the folder name, and `thermal_hdf_config` is the build target.
+
+6. Build the customized version by referring to [Quick Start](../quick-start/quickstart-overview.md).
+
+ ```shell
+ ./build.sh --product-name rk3568 --ccache
+ ```
+
+7. Burn the customized version to the DAYU200 development board.
+
+### Debugging and Verification
+
+1. After startup, run the following command to launch the shell command line:
+ ```shell
+ hdc shell
+ ```
+
+2. Obtain the current thermal control information.
+ ```shell
+ hidumper -s 3303 -a -a
+ ```
+
+ The following is the reference thermal control result after customization:
+ ```shell
+ -------------------------------[ability]-------------------------------
+
+
+ ----------------------------------ThermalService---------------------------------
+ name: cpu_big strict: 0 enableEvent: 0
+ name: cpu_med strict: 0 enableEvent: 0
+ name: cpu_lit strict: 0 enableEvent: 0
+ name: gpu strict: 0 enableEvent: 0
+ name: boost strict: 0 enableEvent: 0
+ name: lcd strict: 0 enableEvent: 0
+ name: volume uid: 2001,2002 strict: 0 enableEvent: 0
+ name: current protocol: sc,buck strict: 0 enableEvent: 1
+ name: voltage protocol: sc,buck strict: 0 enableEvent: 1
+ name: process_ctrl params: 32,64,128,256 strict: 0 enableEvent: 0
+ name: shut_down strict: 0 enableEvent: 0
+ name: thermallevel strict: 0 enableEvent: 0
+ name: popup strict: 0 enableEvent: 0
+ ```
+
+## Reference
+During development, you can refer to the [default thermal control configuration](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml).
+
+Packing path: `/vendor/etc/thermal_config/hdf`
diff --git a/en/device-dev/subsystems/subsys-thermal_detection.md b/en/device-dev/subsystems/subsys-thermal_detection.md
new file mode 100644
index 0000000000000000000000000000000000000000..023153f2214f6ae79544480b84228cb11ac71d65
--- /dev/null
+++ b/en/device-dev/subsystems/subsys-thermal_detection.md
@@ -0,0 +1,149 @@
+# Thermal Detection Customization
+
+## Overview
+
+### Introduction
+
+By default, OpenHarmony provides the thermal detection feature. A component, for example, the CPU or battery, generates heat while it is running. In this case, the component reports its temperature in real time through the corresponding temperature sensor. The thermal detection feature detects the temperature of components in real time and provides temperature input for the thermal management module. However, thermal detection on components varies according to product specifications. To address this issue, OpenHarmony provides the thermal detection customization function.
+
+### Constraints
+
+The configuration path for battery level customization is subject to the [configuration policy](https://gitee.com/openharmony/customization_config_policy). In this development guide, `/vendor` is used as an example of the configuration path. During actual development, you need to modify the customization path based on the product configuration policy.
+
+## How to Develop
+
+### Setting Up the Environment
+
+**Hardware requirements:**
+
+Development board running the standard system, for example, the DAYU200 or Hi3516D V300 open source suite.
+
+**Environment requirements:**
+
+For details about the requirements on the Linux environment, see [Quick Start](../quick-start/quickstart-overview.md).
+
+### Getting Started with Development
+
+The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568) as an example to illustrate thermal detection customization.
+
+1. Create the `thermal` folder in the product directory [/vendor/hihope/rk3568](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568).
+
+2. Create a target folder by referring to the [default thermal detection configuration folder](https://gitee.com/openharmony/drivers_peripheral/tree/master/thermal/interfaces/hdi_service/profile), and install it in `//vendor/hihope/rk3568/thermal`. The content is as follows:
+
+ ```text
+ profile
+ ├── BUILD.gn
+ ├── thermal_hdi_config.xml
+ ```
+
+3. Write the custom `thermal_hdi_config.xml` file by referring to the [thermal_hdi_config.xml](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/interfaces/hdi_service/profile/thermal_hdi_config.xml) file in the default thermal detection configuration folder. The following table describes the related configuration items.
+
+ **Table 1** Configuration items for thermal detection
+
+ |Node| Configuration Item| Description| Value Type|
+ | -------- | -------- | -------- | -------- |
+ | item | tag | Temperature flag name of an actual or simulated node.| string |
+ | item | value | Temperature flag value. Value **1** means to obtain the temperature of a simulated node, and the value **0**, means to obtain the temperature of an actual node.| int |
+ | group | name | Name of the actual or simulated node group.| string |
+ | group | interval | Polling interval, in ms (default).| int |
+ | thermal_zone | type | Thermal zone name.| string |
+ | thermal_zone | path | Path for obtaining the thermal zone temperature of an actual node.| string |
+ | thermal_node | type | Thermal node name.| string |
+ | thermal_node | path | Path for obtaining the thermal node temperature of a simulated node.| string |
+
+ ```shell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ```
+ For details about the path for obtaining the actual node temperature, see the path for obtaining the thermal zone temperature in [Thermal Log](../subsystems/subsys-thermal_log.md). For details about the path for obtaining the simulated node temperature, see [Default Thermal Detection Configuration](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/interfaces/hdi_service/profile/thermal_hdi_config.xml).
+
+5. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/interfaces/hdi_service/profile/BUILD.gn) file in the default thermal detection configuration folder to pack the `thermal_hdi_config.xml` file to the `//vendor/etc/thermal_config/hdf` directory. The configuration is as follows:
+
+ ```shell
+ import("//build/ohos.gni")
+
+ ohos_prebuilt_etc("thermal_hdf_config") {
+ source = "thermal_hdi_config.xml"
+ relative_install_dir = "thermal_config/hdf"
+ install_images = [ chipset_base_dir ] # Required configuration for installing the thermal_hdi_config.xml file in the vendor directory.
+ part_name = "product_rk3568" # Set part_name to product_rk3568 for subsequent build. You can change it as required.
+ }
+ ```
+
+6. Add the build target to `module_list` in [ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build) in the `/vendor/hihope/rk3568` directory. For example:
+
+ ```json
+ {
+ "parts": {
+ "product_rk3568": {
+ "module_list": [
+ "//vendor/hihope/rk3568/default_app_config:default_app_config",
+ "//vendor/hihope/rk3568/image_conf:custom_image_conf",
+ "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
+ "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
+ "//vendor/hihope/rk3568/etc:product_etc_conf",
+ "//vendor/hihope/rk3568/thermal/profile:thermal_hdf_config", // Add the configuration for building of thermal_hdf_config.
+ ]
+ }
+ },
+ "subsystem": "product_hihope"
+ }
+ ```
+ In the preceding code, `//vendor/hihope/rk3568/thermal/` is the folder path, `profile` is the folder name, and `thermal_hdf_config` is the build target.
+
+7. Build the customized version by referring to [Quick Start](../quick-start/quickstart-overview.md).
+
+ ```shell
+ ./build.sh --product-name rk3568 --ccache
+ ```
+
+8. Burn the customized version to the DAYU200 development board.
+
+### Debugging and Verification
+
+1. After startup, run the following command to launch the shell command line:
+ ```shell
+ hdc shell
+ ```
+
+2. Obtain the thermal detection result of the thermal zone.
+ ```shell
+ hidumper -s 3303 -a -t
+ ```
+
+ The following is the reference thermal detection result of the thermal zone. The value of **Temperature** is in unit of 0.001°C by default.
+ ```shell
+ -------------------------------[ability]-------------------------------
+
+
+ ----------------------------------ThermalService---------------------------------
+ ········· (Only the thermal detection result is displayed here. Other information is omitted.)
+ Type: gpu-thermal
+ Temperature: 35555
+ Type: soc-thermal
+ Temperature: 35000
+ ······
+ ```
+
+## Reference
+During development, you can refer to the [default thermal detection configuration](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/interfaces/hdi_service/profile/thermal_hdi_config.xml).
+
+Packing path: `/vendor/etc/thermal_config/hdf`
diff --git a/en/device-dev/subsystems/subsys-thermal_level.md b/en/device-dev/subsystems/subsys-thermal_level.md
new file mode 100644
index 0000000000000000000000000000000000000000..b7afd9404d6e24417fd6d0f957d0c8ab18ce64fc
--- /dev/null
+++ b/en/device-dev/subsystems/subsys-thermal_level.md
@@ -0,0 +1,162 @@
+# Thermal Level Customization
+
+## Overview
+
+### Introduction
+
+By default, OpenHarmony provides the thermal level feature. Different hardware devices generate different amounts of heat and can tolerate different maximum temperatures. Therefore, for different components, the thermal level standard needs to be defined based on their temperatures to clearly indicate the thermal status and provide input for thermal control. However, the thermal level of components at different temperatures varies according to product specifications. To address this issue, OpenHarmony provides the thermal level customization function.
+
+### Constraints
+
+The configuration path for battery level customization is subject to the [configuration policy](https://gitee.com/openharmony/customization_config_policy). In this development guide, `/vendor` is used as an example of the configuration path. During actual development, you need to modify the customization path based on the product configuration policy.
+
+## How to Develop
+
+### Setting Up the Environment
+
+**Hardware requirements:**
+
+Development board running the standard system, for example, the DAYU200 or Hi3516D V300 open source suite.
+
+**Environment requirements:**
+
+For details about the requirements on the Linux environment, see [Quick Start](../quick-start/quickstart-overview.md).
+
+### Getting Started with Development
+
+The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568) as an example to illustrate thermal level customization.
+
+1. Create the `thermal` folder in the product directory [/vendor/hihope/rk3568](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568).
+
+2. Create a target folder by referring to the [default thermal level configuration folder](https://gitee.com/openharmony/powermgr_thermal_manager/tree/master/services/native/profile), and install it in `//vendor/hihope/rk3568/thermal`. The content is as follows:
+
+ ```text
+ profile
+ ├── BUILD.gn
+ ├── thermal_service_config.xml
+ ```
+
+3. Write the custom `thermal_service_config.xml` file by referring to the [thermal_service_config.xml](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml) file in the default thermal level configuration folder. The following tables describe the related configuration items.
+
+ **Table 1** Description of the base configuration
+ | Configuration Item| Description| Parameter| Parameter Description| Type| Value Range|
+ | -------- | -------- | -------- | -------- | -------- | -------- |
+ | tag="history_temp_count" | Name of the tag indicating the number of historical temperature reporting times.| value | Number of historical temperature reporting times.| int | >0 |
+ | tag="temperature_query_enum" | Tag name of the device list for obtaining the temperature.| value | Device list for obtaining the temperature.| enum | soc, battery, shell, cpu, charger, ambient, ap, and pa|
+
+
+ **Table 2** Description of the sensor_cluster configuration
+
+ | Configuration Item | Description | Data Type | Value Range |
+ | -------- | -------- | -------- | -------- |
+ | name | Sensor cluster name | string | None |
+ | sensor | Sensors in the cluster | string | soc, battery, shell, cpu, charger, ambient, ap, and pa |
+ | aux_sensor | Auxiliary sensors in the cluster | string | soc, battery, shell, cpu, charger, ambient, ap, and pa |
+
+ **Table 3** Description of the item configuration
+
+ | Configuration Item | Description | Data Type | Value Range |
+ | -------- | -------- | -------- | -------- |
+ | level | Thermal level defined for each sensor cluster | int | >0 |
+ | threshold | Temperature threshold for each sensor in the cluster to reach the corresponding thermal level. The value is in unit of 0.001°C by default and can be changed as needed. | int | Product-specific |
+ | threshold_clr | Temperature threshold for each sensor in the cluster to roll back to the previous thermal level. | int | Product-specific |
+ | temp_rise_rate | Temperature rise frequency. | double | Product-specific |
+
+ ```shell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ```
+
+4. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/BUILD.gn) file in the default thermal level configuration folder to pack the `thermal_service_config.xml` file to the `/vendor/etc/thermal_config` directory. The configuration is as follows:
+
+ ```shell
+ import("//build/ohos.gni") # Reference build/ohos.gni.
+
+ ohos_prebuilt_etc("thermal_service_config") {
+ source = "thermal_service_config.xml"
+ relative_install_dir = "thermal_config"
+ install_images = [ chipset_base_dir ] # Required configuration for installing the thermal_service_config.xml file in the vendor directory.
+ part_name = "product_rk3568" # Set part_name to product_rk3568 for subsequent build. You can change it as required.
+ }
+ ```
+
+5. Add the build target to `module_list` in [ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build) in the `/vendor/hihope/rk3568` directory. For example:
+
+ ```json
+ {
+ "parts": {
+ "product_rk3568": {
+ "module_list": [
+ "//vendor/hihope/rk3568/default_app_config:default_app_config",
+ "//vendor/hihope/rk3568/image_conf:custom_image_conf",
+ "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
+ "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
+ "//vendor/hihope/rk3568/etc:product_etc_conf",
+ "//vendor/hihope/rk3568/thermal/profile:thermal_service_config", // Add the configuration for building of thermal_service_config.
+ ]
+ }
+ },
+ "subsystem": "product_hihope"
+ }
+ ```
+ In the preceding code, `//vendor/hihope/rk3568/thermal/` is the folder path, `profile` is the folder name, and `thermal_hdf_config` is the build target.
+
+6. Build the customized version by referring to [Quick Start](../quick-start/quickstart-overview.md).
+
+ ```shell
+ ./build.sh --product-name rk3568 --ccache
+ ```
+
+7. Burn the customized version to the DAYU200 development board.
+
+### Debugging and Verification
+
+1. After startup, run the following command to launch the shell command line:
+ ```shell
+ hdc shell
+ ```
+
+2. Go to the `data/service/el0/thermal/sensor/soc/` directory.
+ ```shell
+ cd data/service/el0/thermal/sensor/soc
+ ```
+
+3. Change the SOC temperature.
+ ```shell
+ echo 42000 > temp
+ ```
+
+4. Obtain the current thermal level information.
+ ```shell
+ hidumper -s 3303 -a -l
+ ```
+
+ The following is the reference thermal level information after customization:
+ ```shell
+ -------------------------------[ability]-------------------------------
+
+
+ ----------------------------------ThermalService---------------------------------
+ name: base_safe level: 2
+ name: cold_safe level: 0
+ name: high_safe level: 0
+ name: warm_5G level: 0
+ name: warm_safe level: 1
+ ```
+
+## Reference
+During development, you can refer to the [default thermal level configuration](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml).
+
+Packing path: `/vendor/etc/thermal_config/hdf`
diff --git a/en/device-dev/subsystems/subsys-thermal_log.md b/en/device-dev/subsystems/subsys-thermal_log.md
new file mode 100644
index 0000000000000000000000000000000000000000..2e889e833a99a13a492ce58c2c2cc04ab0643423
--- /dev/null
+++ b/en/device-dev/subsystems/subsys-thermal_log.md
@@ -0,0 +1,200 @@
+# Thermal Log Customization
+
+## Overview
+
+### Introduction
+
+By default, the OpenHarmony provides the thermal log feature. Thermal logs record the temperature of device components during usage. However, the content and path of thermal logs vary according to product specifications. To address this issue, OpenHarmony provides the thermal log customization function.
+
+### Constraints
+
+The configuration path for battery level customization is subject to the [configuration policy](https://gitee.com/openharmony/customization_config_policy). In this development guide, `/vendor` is used as an example of the configuration path. During actual development, you need to modify the customization path based on the product configuration policy.
+
+## How to Develop
+
+### Setting Up the Environment
+
+**Hardware requirements:**
+
+Development board running the standard system, for example, the DAYU200 or Hi3516D V300 open source suite.
+
+**Environment requirements:**
+
+For details about the requirements on the Linux environment, see [Quick Start](../quick-start/quickstart-overview.md).
+
+### Getting Started with Development
+
+The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568) as an example to illustrate thermal log customization.
+
+1. Create the `thermal` folder in the product directory [/vendor/hihope/rk3568](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568).
+
+2. Create a target folder by referring to the [default thermal log configuration folder](https://gitee.com/openharmony/drivers_peripheral/tree/master/thermal/interfaces/hdi_service/profile), and install it in `//vendor/hihope/rk3568/thermal`. The content is as follows:
+
+ ```text
+ profile
+ ├── BUILD.gn
+ ├── thermal_hdi_config.xml
+ ```
+
+3. Create a target folder by referring to the [default thermal log parameter configuration folder] (https://gitee.com/openharmony/drivers_peripheral/tree/master/thermal/etc) and install it in `//vendor/hihope/rk3568/thermal`. The file format is as follows:
+ ```text
+ etc
+ ├── BUILD.gn
+ ├── thermal.para
+ ├── thermal.para.dac
+ ```
+
+4. Write the custom `thermal_hdi_config.xml` file by referring to the [thermal_hdi_config.xml](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/interfaces/hdi_service/profile/thermal_hdi_config.xml) file in the default thermal log configuration folder. The following tables describe the related configuration items.
+
+ **Table 1** Description of the tracing configuration
+
+ | Configuration Item| Description| Data Type| Value Range|
+ | -------- | -------- | -------- | -------- |
+ | interval | Interval for recording temperature tracing logs, in ms.| int | >0 |
+ | width | Width of the temperature tracing log, in characters.| int | >0 |
+ | outpath | Path for storing temperature tracing logs.| string | N/A|
+
+ **Table 2** Description of the node configuration
+
+ | Node| Configuration Item| Description|
+ | -------- | -------- | -------- |
+ | title | path | Path for obtaining the thermal zone name.|
+ | title | name | Thermal zone name.|
+ | value | path | Path for obtaining the thermal zone temperature.|
+
+ ```shell
+
+
+
+
+
+
+
+
+
+
+ ```
+
+5. Write the custom `thermal.para` and `thermal.para.dac` files by referring to the [thermal.para](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/etc/thermal.para) and [thermal.para.dac](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/etc/thermal.para.dac) files in the default hot log parameter configuration folder. The custom configuration is as follows:
+
+ thermal.para:
+ ```text
+ persist.thermal.log.enable=true # Enable the thermal log function.
+ persist.thermal.log.interval=5000 # Set the interval for recording temperature tracing logs, in ms.
+ persist.thermal.log.width=20 # Set the width of the temperature tracing log, in characters.
+ ```
+
+ thermal.para.dac:
+ ```text
+ persist.thermal.log.="power_host:power_host:600" # Configure access permissions.
+ ```
+
+6. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/interfaces/hdi_service/profile/BUILD.gn) file in the default thermal log configuration folder to pack the `thermal_hdi_config.xml` file to the `//vendor/etc/thermal_config/hdf` directory. The configuration is as follows:
+
+ ```shell
+ import("//build/ohos.gni")
+
+ ohos_prebuilt_etc("thermal_hdf_config") {
+ source = "thermal_hdi_config.xml"
+ relative_install_dir = "thermal_config/hdf"
+ install_images = [ chipset_base_dir ] # Required configuration for installing the thermal_hdi_config.xml file in the vendor directory.
+ part_name = "product_rk3568" # Set part_name to product_rk3568 for subsequent build. You can change it as required.
+ }
+ ```
+
+7. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/drivers_peripheral/blob/master/thermal/etc/BUILD.gn) file in the default thermal log parameter configuration folder to pack the `thermal.para` and `thermal.para.dac` files to the `//vendor/etc/param/thermal.para` directory. The configuration is as follows:
+
+ ```shell
+ import("//build/ohos.gni")
+
+ ## Install thermal.para to /vendor/etc/param/thermal.para
+
+ ohos_prebuilt_etc("thermal.para") {
+ source = "thermal.para"
+ relative_install_dir = "param"
+ install_images = [ chipset_base_dir ]
+ part_name = "product_rk3568"
+ }
+
+ ohos_prebuilt_etc("thermal.para.dac") {
+ source = "thermal.para.dac"
+ relative_install_dir = "param"
+ install_images = [ chipset_base_dir ]
+ part_name = "product_rk3568"
+ }
+
+ group("param_files") {
+ deps = [
+ ":thermal.para",
+ ":thermal.para.dac",
+ ]
+ }
+ ```
+
+8. Add the build target to `module_list` in [ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build) in the `/vendor/hihope/rk3568` directory. For example:
+
+ ```json
+ {
+ "parts": {
+ "product_rk3568": {
+ "module_list": [
+ "//vendor/hihope/rk3568/default_app_config:default_app_config",
+ "//vendor/hihope/rk3568/image_conf:custom_image_conf",
+ "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
+ "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
+ "//vendor/hihope/rk3568/etc:product_etc_conf",
+ "//vendor/hihope/rk3568/thermal/profile:thermal_hdf_config", // Add the configuration for building of thermal_hdf_config.
+ "//vendor/hihope/rk3568/thermal/etc:param_files" // Add the configuration for building of thermal.para and thermal.para.dac.
+ ]
+ }
+ },
+ "subsystem": "product_hihope"
+ }
+ ```
+ In the preceding code, `//vendor/hihope/rk3568/thermal/` is the folder path, `profile` and `etc` are folder names, and `thermal_hdf_config` and `param_files` are the build targets.
+
+9. Build the customized version by referring to [Quick Start](../quick-start/quickstart-overview.md).
+
+ ```shell
+ ./build.sh --product-name rk3568 --ccache
+ ```
+
+10. Burn the customized version to the DAYU200 development board.
+
+### Debugging and Verification
+
+1. After startup, run the following command to launch the shell command line:
+ ```shell
+ hdc shell
+ ```
+
+2. Go to the customized directory.
+ ```shell
+ cd /data/log/thermal/
+ ```
+
+ View thermal logs.
+ ```shell
+ cat thermal.000.20170805-175756
+ ```
+
+ The following is the reference thermal log after customization:
+ ```shell
+ timestamp soc-thermal gpu-thermal
+ 2017-08-05 17:57:56 37777 37222
+ 2017-08-05 17:58:01 38333 37777
+ 2017-08-05 17:58:06 36666 37222
+ 2017-08-05 17:58:11 36666 37222
+ 2017-08-05 17:58:16 36666 37222
+ 2017-08-05 17:58:21 36111 37222
+ 2017-08-05 17:58:26 36111 37222
+ 2017-08-05 17:58:31 36666 37222
+ 2017-08-05 17:58:36 36111 37222
+ 2017-08-05 17:58:41 36111 37222
+ 2017-08-05 17:58:46 36666 36666
+ ```
+
+## Reference
+During development, you can refer to the [default thermal log configuration](https://gitee.com/openharmony/drivers_peripheral/tree/master/thermal/interfaces/hdi_service/profile/) and [default thermal log parameter configuration](https://gitee.com/openharmony/drivers_peripheral/tree/master/thermal/etc).
+
+Packing path: `/vendor/etc/thermal_config/hdf`
diff --git a/en/device-dev/subsystems/subsys-thermal_policy.md b/en/device-dev/subsystems/subsys-thermal_policy.md
new file mode 100644
index 0000000000000000000000000000000000000000..a93ccd57335a9fab1af4abfc7843063973fcf3ca
--- /dev/null
+++ b/en/device-dev/subsystems/subsys-thermal_policy.md
@@ -0,0 +1,229 @@
+# Thermal Policy Customization
+
+## Overview
+
+### Introduction
+
+By default, the OpenHarmony provides the thermal policy feature. Various components on a device can generate heat. Therefore, for different components, the thermal policy needs to be defined based on their thermal levels and thermal scenes. However, thermal control at different thermal levels varies according to product specifications. To address this issue, OpenHarmony provides the thermal policy customization function.
+
+### Constraints
+
+The configuration path for battery level customization is subject to the [configuration policy](https://gitee.com/openharmony/customization_config_policy). In this development guide, `/vendor` is used as an example of the configuration path. During actual development, you need to modify the customization path based on the product configuration policy.
+
+## How to Develop
+
+### Setting Up the Environment
+
+**Hardware requirements:**
+
+Development board running the standard system, for example, the DAYU200 or Hi3516D V300 open source suite.
+
+**Environment requirements:**
+
+For details about the requirements on the Linux environment, see [Quick Start](../quick-start/quickstart-overview.md).
+
+### Getting Started with Development
+
+The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568) as an example to illustrate thermal policy customization.
+
+1. Create the `thermal` folder in the product directory [/vendor/hihope/rk3568](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568).
+
+2. Create a target folder by referring to the [default thermal policy configuration folder](https://gitee.com/openharmony/powermgr_thermal_manager/tree/master/services/native/profile), and install it in `//vendor/hihope/rk3568/thermal`. The content is as follows:
+
+ ```text
+ profile
+ ├── BUILD.gn
+ ├── thermal_service_config.xml
+ ```
+
+3. Write the custom `thermal_service_config.xml` file by referring to the [thermal_service_config.xml](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml) file in the default thermal policy configuration folder. The following tables describe the related configuration items.
+
+ **Table 1** Description of the config configuration
+
+ | Configuration Item| Description| Type| Value Range|
+ | -------- | -------- | -------- | -------- |
+ | name | Name of the sensor cluster corresponding to the thermal policy.| string | Corresponding to the sensor cluster name defined in [Thermal Level](../subsystems/subsys-thermal_level.md).|
+ | level | Thermal level corresponding to the thermal policy.| int | Corresponding to the thermal level defined for the sensor cluster in [Thermal Level](../subsystems/subsys-thermal_level.md).|
+
+ **Table 2** Description of configuration items
+
+ | Configuration Item| Description| Type| Value Range|
+ | -------- | -------- | -------- | -------- |
+ | scene | Application scenario.| string | Corresponding to the application scenario defined in [Thermal Scene](../subsystems/subsys-thermal_scene.md).|
+ | charge | Charging status.| int | The value **1** indicates charging, and the value **0** indicates the opposite.|
+ | screen | Screen status.| int | The value **1** indicates that the screen is on, and the value **0** indicates the opposite.|
+
+ **Table 3** Description of the node configuration
+
+ | Node| Value Type| Value Range| Description|
+ | -------- | -------- | -------- | -------- |
+ | lcd | double | 0.00~1.00 | Percentage of the screen brightness (represented by a floating point number).|
+ | cpu_big | int | Product-specific| CPU big core frequency.|
+ | cpu_med | int | Product-specific| CPU medium-core frequency.|
+ | cpu_lit | int | Product-specific| CPU small-core frequency.|
+ | process_ctrl | enum | 1: KILL_FG_PROCESS_APP
2: KILL_BG_PROCESS_APP
3: KILL_ALL_PROCESS_APP| Process control.|
+ | gpu | int | Product-specific| GPU frequency.|
+ | thermallevel | int | Corresponding to **level** defined in the **config** node| Thermal level.|
+ | current_sc | int | Product-specific| Fast charging current.|
+ | current_buck | int | Product-specific| Slow charging current.|
+ | voltage_sc | int | Product-specific| Fast charging voltage.|
+ | voltage_buck | int | Product-specific| Slow charging voltage.|
+ | volume | double | 0.00~1.00 | Volume percentage (represented by a floating point number).|
+
+ ```shell
+
+
+ 1.00
+ 0.99
+ 0.98
+ 0.95
+ 1992000
+ 1991500
+ 1991200
+ 3
+ 1991800
+ 1991600
+ 524288
+ 512000
+ 1
+ 1800
+ 1200
+ 1200
+ 4000
+ 3000
+ 1.0
+
+
+
+ 0.90
+ 0.89
+ 0.88
+ 0.87
+ 1991000
+ 1990500
+ 1990200
+ 2
+ 1990800
+ 1990600
+ 499712
+ 487424
+ 2
+ 1500
+ 1000
+ 1000
+ 3000
+ 2000
+ 0.8
+
+
+ ```
+
+4. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/BUILD.gn) file in the default thermal policy configuration folder to pack the `thermal_service_config.xml` file to the `/vendor/etc/thermal_config` directory. The configuration is as follows:
+
+ ```shell
+ import("//build/ohos.gni") # Reference build/ohos.gni.
+
+ ohos_prebuilt_etc("thermal_service_config") {
+ source = "thermal_service_config.xml"
+ relative_install_dir = "thermal_config"
+ install_images = [ chipset_base_dir ] # Required configuration for installing the thermal_service_config.xml file in the vendor directory.
+ part_name = "product_rk3568" # Set part_name to product_rk3568 for subsequent build. You can change it as required.
+ }
+ ```
+
+5. Add the build target to `module_list` in [ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build) in the `/vendor/hihope/rk3568` directory. For example:
+
+ ```json
+ {
+ "parts": {
+ "product_rk3568": {
+ "module_list": [
+ "//vendor/hihope/rk3568/default_app_config:default_app_config",
+ "//vendor/hihope/rk3568/image_conf:custom_image_conf",
+ "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
+ "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
+ "//vendor/hihope/rk3568/etc:product_etc_conf",
+ "//vendor/hihope/rk3568/thermal/profile:thermal_service_config", // Add the configuration for building of thermal_service_config.
+ ]
+ }
+ },
+ "subsystem": "product_hihope"
+ }
+ ```
+ In the preceding code, `//vendor/hihope/rk3568/thermal/` is the folder path, `profile` is the folder name, and `thermal_hdf_config` is the build target.
+
+6. Build the customized version by referring to [Quick Start](../quick-start/quickstart-overview.md).
+
+ ```shell
+ ./build.sh --product-name rk3568 --ccache
+ ```
+
+7. Burn the customized version to the DAYU200 development board.
+
+### Debugging and Verification
+
+1. After startup, run the following command to launch the shell command line:
+ ```shell
+ hdc shell
+ ```
+
+2. Obtain the current thermal policy information.
+ ```shell
+ hidumper -s 3303 -a -p
+ ```
+
+ The following is the reference thermal policy result after customization:
+ ```shell
+ -------------------------------[ability]-------------------------------
+
+
+ ----------------------------------ThermalService---------------------------------
+ name: base_safe level: 1
+ actionName: lcd actionValue: 1.00 isProp: 0
+ actionName: lcd actionValue: 0.99 scene: cam isProp: 1
+ actionName: lcd actionValue: 0.98 scene: call isProp: 1
+ actionName: lcd actionValue: 0.95 scene: game isProp: 1
+ actionName: cpu_big actionValue: 1992000 isProp: 0
+ actionName: cpu_med actionValue: 1991500 isProp: 0
+ actionName: cpu_lit actionValue: 1991200 isProp: 0
+ actionName: process_ctrl actionValue: 3 isProp: 0
+ actionName: cpu_big actionValue: 1991800 charge: 1 scene: cam isProp: 1
+ actionName: cpu_big actionValue: 1991600 charge: 0 scene: cam isProp: 1
+ actionName: gpu actionValue: 524288 screen: 0 isProp: 1
+ actionName: gpu actionValue: 512000 screen: 1 isProp: 1
+ actionName: thermallevel actionValue: 1 isProp: 0
+ actionName: current_sc actionValue: 1800 isProp: 0
+ actionName: current_sc actionValue: 1200 scene: cam isProp: 1
+ actionName: current_buck actionValue: 1200 isProp: 0
+ actionName: voltage_sc actionValue: 4000 isProp: 0
+ actionName: voltage_buck actionValue: 3000 isProp: 0
+ actionName: volume actionValue: 1.0 isProp: 0
+ actionName: boost actionValue: 1 isProp: 0
+
+ level: 2
+ actionName: lcd actionValue: 0.90 isProp: 0
+ actionName: lcd actionValue: 0.89 scene: cam isProp: 1
+ actionName: lcd actionValue: 0.88 scene: call isProp: 1
+ actionName: lcd actionValue: 0.87 scene: game isProp: 1
+ actionName: cpu_big actionValue: 1991000 isProp: 0
+ actionName: cpu_med actionValue: 1990500 isProp: 0
+ actionName: cpu_lit actionValue: 1990200 isProp: 0
+ actionName: process_ctrl actionValue: 2 isProp: 0
+ actionName: cpu_big actionValue: 1990800 charge: 1 scene: cam isProp: 1
+ actionName: cpu_big actionValue: 1990600 charge: 0 scene: cam isProp: 1
+ actionName: gpu actionValue: 499712 screen: 0 isProp: 1
+ actionName: gpu actionValue: 487424 screen: 1 isProp: 1
+ actionName: thermallevel actionValue: 2 isProp: 0
+ actionName: current_sc actionValue: 1500 isProp: 0
+ actionName: current_sc actionValue: 1000 scene: cam isProp: 1
+ actionName: current_buck actionValue: 1000 isProp: 0
+ actionName: voltage_sc actionValue: 3000 isProp: 0
+ actionName: voltage_buck actionValue: 2000 isProp: 0
+ actionName: volume actionValue: 0.8 isProp: 0
+ actionName: boost actionValue: 1 isProp: 0
+ ```
+
+## Reference
+During development, you can refer to the [default thermal policy configuration](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml).
+
+Packing path: `/vendor/etc/thermal_config/hdf`
diff --git a/en/device-dev/subsystems/subsys-thermal_scene.md b/en/device-dev/subsystems/subsys-thermal_scene.md
new file mode 100644
index 0000000000000000000000000000000000000000..4db0af2defc5600c56e1af750553a3e50a770530
--- /dev/null
+++ b/en/device-dev/subsystems/subsys-thermal_scene.md
@@ -0,0 +1,125 @@
+# Thermal Scene Customization
+
+## Overview
+
+### Introduction
+
+By default, OpenHarmony provides the thermal scene feature. During device usage, for example, gaming, photographing, or calling, the system will try to balance the performance, temperature, and power consumption. The thermal policy is usually scenario-specific. For example, the thermal policy in the gaming scenario does not decrease the screen brightness. However, the thermal scene definition varies according to product specifications. To address this issue, OpenHarmony provides the thermal scene customization function.
+
+### Constraints
+
+The configuration path for battery level customization is subject to the [configuration policy](https://gitee.com/openharmony/customization_config_policy). In this development guide, `/vendor` is used as an example of the configuration path. During actual development, you need to modify the customization path based on the product configuration policy.
+
+## How to Develop
+
+### Setting Up the Environment
+
+**Hardware requirements:**
+
+Development board running the standard system, for example, the DAYU200 or Hi3516D V300 open source suite.
+
+**Environment requirements:**
+
+For details about the requirements on the Linux environment, see [Quick Start](../quick-start/quickstart-overview.md).
+
+### Getting Started with Development
+
+The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568) as an example to illustrate thermal scene customization.
+
+1. Create the `thermal` folder in the product directory [/vendor/hihope/rk3568](https://gitee.com/openharmony/vendor_hihope/tree/master/rk3568).
+
+2. Create a target folder by referring to the [default thermal scene configuration folder](https://gitee.com/openharmony/powermgr_thermal_manager/tree/master/services/native/profile), and install it in `//vendor/hihope/rk3568/thermal`. The content is as follows:
+
+ ```text
+ profile
+ ├── BUILD.gn
+ ├── thermal_service_config.xml
+ ```
+
+3. Write the custom `thermal_service_config.xml` file by referring to the [thermal_service_config.xml](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml) file in the default thermal scene configuration folder. The following table describes the related configuration items.
+
+ **Table 1** Configuration items for the thermal scene
+
+ | Configuration Item| Configuration Item Description| Parameter| Parameter Description| Parameter Type| Value Range|
+ | -------- | -------- | -------- | -------- | -------- | -------- |
+ | name="scene" | One or more application scenarios specified by enum values.| param | Application scenarios: photographing, calling, and gaming.| enum | cam, call, and game|
+
+ **screen** and **charge** indicate the status of the application scenario; and specifically, whether the screen is turned on and whether the battery is being charged.
+
+ ```shell
+
+
+
+
+
+ ```
+
+4. Write the `BUILD.gn` file by referring to the [BUILD.gn](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/BUILD.gn) file in the default thermal scene configuration folder to pack the `thermal_service_config.xml` file to the `/vendor/etc/thermal_config` directory. The configuration is as follows:
+
+ ```shell
+ import("//build/ohos.gni") # Reference build/ohos.gni.
+
+ ohos_prebuilt_etc("thermal_service_config") {
+ source = "thermal_service_config.xml"
+ relative_install_dir = "thermal_config"
+ install_images = [ chipset_base_dir ] # Required configuration for installing the thermal_service_config.xml file in the vendor directory.
+ part_name = "product_rk3568" # Set part_name to product_rk3568 for subsequent build. You can change it as required.
+ }
+ ```
+
+5. Add the build target to `module_list` in [ohos.build](https://gitee.com/openharmony/vendor_hihope/blob/master/rk3568/ohos.build) in the `/vendor/hihope/rk3568` directory. For example:
+
+ ```json
+ {
+ "parts": {
+ "product_rk3568": {
+ "module_list": [
+ "//vendor/hihope/rk3568/default_app_config:default_app_config",
+ "//vendor/hihope/rk3568/image_conf:custom_image_conf",
+ "//vendor/hihope/rk3568/preinstall-config:preinstall-config",
+ "//vendor/hihope/rk3568/resourceschedule:resourceschedule",
+ "//vendor/hihope/rk3568/etc:product_etc_conf",
+ "//vendor/hihope/rk3568/thermal/profile:thermal_service_config", // Add the configuration for building of thermal_service_config.
+ ]
+ }
+ },
+ "subsystem": "product_hihope"
+ }
+ ```
+ In the preceding code, `//vendor/hihope/rk3568/thermal/` is the folder path, `profile` is the folder name, and `thermal_hdf_config` is the build target.
+
+6. Build the customized version by referring to [Quick Start](../quick-start/quickstart-overview.md).
+
+ ```shell
+ ./build.sh --product-name rk3568 --ccache
+ ```
+
+7. Burn the customized version to the DAYU200 development board.
+
+### Debugging and Verification
+
+1. After startup, run the following command to launch the shell command line:
+ ```shell
+ hdc shell
+ ```
+
+2. Obtain the current thermal scene information.
+ ```shell
+ hidumper -s 3303 -a -s
+ ```
+
+ The following is the reference thermal scene result after customization:
+ ```shell
+ -------------------------------[ability]-------------------------------
+
+
+ ----------------------------------ThermalService---------------------------------
+ name: scene params: cam,call,game
+ name: screen
+ name: charge
+ ```
+
+## Reference
+During development, you can refer to the [default thermal scene configuration](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml).
+
+Packing path: `/vendor/etc/thermal_config/hdf`
diff --git a/en/device-dev/website.md b/en/device-dev/website.md
index a78fa5d61b45ec22f5cc6ce5aa5dc164e346144f..ab50b73700c613e03a320fd03ae94cf61de4bada 100644
--- a/en/device-dev/website.md
+++ b/en/device-dev/website.md
@@ -391,7 +391,9 @@
- [Audio/Video Playback Development](subsystems/subsys-multimedia-video-play-guide.md)
- [Audio/Video Recording Development](subsystems/subsys-multimedia-video-record-guide.md)
- [Utils Development](subsystems/subsys-utils-guide.md)
- - [AI Framework Development](subsystems/subsys-ai-aiframework-devguide.md)
+ - AI
+ - [AI Framework Development](subsystems/subsys-ai-aiframework-devguide.md)
+ - [NNRt Development](subsystems/subsys-ai-nnrt-guide.md)
- Data Management
- RDB
- [RDB Overview](subsystems/subsys-data-relational-database-overview.md)
@@ -454,7 +456,24 @@
- [HiChecker Development](subsystems/subsys-dfx-hichecker.md)
- [FaultLogger Development](subsystems/subsys-dfx-faultlogger.md)
- [Hiview Development](subsystems/subsys-dfx-hiview.md)
-
+ - Power
+ - Power Consumption Statistics
+ - [Power Consumption Statistics Customization](subsystems/subsys-power-stats-power-average-customization.md)
+ - Battery Management
+ - [Battery Level and LED Color Mapping Customization](subsystems/subsys-power-level-LED-color.md)
+ - [Battery Temperature Protection Customization](subsystems/subsys-power-temperature-protection.md)
+ - [Battery Level Customization](subsystems/subsys-power-battery-level-customization.md)
+ - [Charging Current and Voltage Limit Customization](subsystems/subsys-power-charge-current-voltage-limit.md)
+ - [Charging Type Customization](subsystems/subsys-power-charge-type-customization.md)
+ - [Power-off Charging Animation Customization](subsystems/subsys-power-poweroff-charge-animation.md)
+ - Thermal Management
+ - [Charging Idle State Customization](subsystems/subsys-thermal_charging_idle_state.md)
+ - [Thermal Control Customization](subsystems/subsys-thermal_control.md)
+ - [Thermal Detection Customization](subsystems/subsys-thermal_detection.md)
+ - [Thermal Level Customization](subsystems/subsys-thermal_level.md)
+ - [Thermal Log Customization](subsystems/subsys-thermal_log.md)
+ - [Thermal Policy Customization](subsystems/subsys-thermal_policy.md)
+ - [Thermal Scene Customization](subsystems/subsys-thermal_scene.md)
- Featured Topics
- HPM Part
- [HPM Part Overview](hpm-part/hpm-part-about.md)
diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md
index 9a5e30e4a4c8d24266d966f9ac6dc249748cfa60..4802e2b0ab8c74e9fabe42238cf13e95a8657599 100644
--- a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md
+++ b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelogs-usb.md
@@ -1,4 +1,4 @@
-USB Manager ChangeLog
+# USB Subsystem API Changelog
## cl.usb_manager.1 System API Change
@@ -13,6 +13,16 @@ If your application is developed based on earlier versions, modify the return va
| ohos.usbV9.d.ts | function setCurrentFunctions(funcs: FunctionType): Promise; | function setCurrentFunctions(funcs: FunctionType): Promise; |
| ohos.usbV9.d.ts | function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise; | function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise; |
+## cl.usb_manager.2 SDK API Deletion
+
+The **@ohos.usbV9.d.ts** file was deleted in OpenHarmony 4.0.5.5.
+
+You need to import **@ohos.usbManager** to use USB service APIs.
+
+ ```ts
+ import usbManager from '@ohos.usbManager';
+ ```
+
**Adaptation Guide**
-For details, see the [reference](../../../application-dev/reference/errorcodes/errorcode-universal.md) for each API.
+For details about usage of each API, see the [API Reference](../../../application-dev/reference/apis/js-apis-usbManager.md).
diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelogs-usb.md b/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelogs-usb.md
new file mode 100644
index 0000000000000000000000000000000000000000..b8218c69f1ccde8d6f8e283f410e1dee64bb4364
--- /dev/null
+++ b/en/release-notes/changelogs/OpenHarmony_4.0.6.1/changelogs-usb.md
@@ -0,0 +1,23 @@
+# USB Subsystem API Changelog
+
+## cl.usb_manager.1 SDK API Deletion
+
+For applications developed based on earlier versions, you need to change the name of the imported bundle. Otherwise, the original service logic will be affected.
+
+**Key API/Component Changes**
+
+The **@ohos.usbV9.d.ts** file is replaced by the **@ohos.usbManager.d.ts** file.
+
+| New Bundle | Original Bundle | Deleted Bundle |
+| -------------------- | ------------- | --------------- |
+| ohos.usbManager.d.ts | ohos.usb.d.ts | ohos.usbV9.d.ts |
+
+You need to import **@ohos.usbManager** to use USB service APIs.
+
+ ```ts
+ import usbManager from '@ohos.usbManager';
+ ```
+
+**Adaptation Guide**
+
+For details about usage of each API, see the [API Reference](../../../application-dev/reference/apis/js-apis-usbManager.md).
diff --git a/zh-cn/application-dev/ability-deprecated/fa-dataability.md b/zh-cn/application-dev/ability-deprecated/fa-dataability.md
index 9ea4cb09d15cfe4005041de376f8a38924beb6f9..c52f0f9ffe951fa30c3588841180aa685f3c9956 100644
--- a/zh-cn/application-dev/ability-deprecated/fa-dataability.md
+++ b/zh-cn/application-dev/ability-deprecated/fa-dataability.md
@@ -116,7 +116,7 @@ URI示例:
| "name" | Ability名称,对应Ability派生的Data类名。 |
| "type" | Ability类型,Data对应的Ability类型为”data“。 |
| "uri" | 通信使用的URI。 |
- | "exported" | 对其他应用是否可见,设置为true时,Data才能与其他应用进行通信传输数据。 |
+ | "visible" | 对其他应用是否可见,设置为true时,Data才能与其他应用进行通信传输数据。 |
**config.json配置样例**
@@ -128,7 +128,7 @@ URI示例:
"srcLanguage": "ets",
"description": "$string:description_dataability",
"type": "data",
- "exported": true,
+ "visible": true,
"uri": "dataability://ohos.samples.etsdataability.DataAbility"
}]
```
diff --git a/zh-cn/application-dev/ability-deprecated/fa-pageability.md b/zh-cn/application-dev/ability-deprecated/fa-pageability.md
index e50a45e59324dc5d9f6a0200913ec378e6e7ce2c..11738e71b001b079bc55f1ddfe623fb08a9aeb27 100644
--- a/zh-cn/application-dev/ability-deprecated/fa-pageability.md
+++ b/zh-cn/application-dev/ability-deprecated/fa-pageability.md
@@ -47,7 +47,7 @@ ability支持单实例和多实例两种启动模式。
| 启动模式 | 描述 |说明 |
| ----------- | ------- |---------------- |
-| multiton | 多实例 | 每次startAbility都会启动一个新的实例。 |
+| standard | 多实例 | 每次startAbility都会启动一个新的实例。 |
| singleton | 单实例 | 系统中只存在唯一一个实例,startAbility时,如果已存在,则复用系统中的唯一一个实例。 |
缺省情况下是singleton模式。
diff --git a/zh-cn/application-dev/ability-deprecated/fa-serviceability.md b/zh-cn/application-dev/ability-deprecated/fa-serviceability.md
index 9185da2d29effc51ef21df7185056a16d1fdaf1b..9c77755ddb73bf095bd172d4607601bfe6ae9161 100644
--- a/zh-cn/application-dev/ability-deprecated/fa-serviceability.md
+++ b/zh-cn/application-dev/ability-deprecated/fa-serviceability.md
@@ -59,7 +59,7 @@ onCommand()与onConnect()的区别在于:
{
"name": ".ServiceAbility",
"type": "service",
- "exported": true
+ "visible": true
...
}
]
diff --git a/zh-cn/application-dev/ability-deprecated/stage-ability.md b/zh-cn/application-dev/ability-deprecated/stage-ability.md
index 35111d3cb2fbff644c534253e4a9a7c715975fd0..bd50e24180a9d3e2e8bd2a81d025617e40196dd5 100644
--- a/zh-cn/application-dev/ability-deprecated/stage-ability.md
+++ b/zh-cn/application-dev/ability-deprecated/stage-ability.md
@@ -12,8 +12,8 @@ Ability支持单实例、多实例和指定实例3种启动模式,在module.js
| 启动模式 | 描述 |说明 |
| ----------- | ------- |---------------- |
-| multiton | 标准模式 | 每次startAbility都会启动一个新的实例。 |
-| singleton | 单实例模式 | 系统中只存在唯一一个实例,startAbility时,如果已存在,则复用系统中的唯一一个实例。 |
+| multiton | 多实例模式 | 每次startAbility都会启动一个新的实例。 |
+| singleton | 单实例模式 | 也是默认情况下的启动模式。系统中只存在唯一一个实例,startAbility时,如果已存在,则复用系统中的唯一一个实例。 |
| specified | 指定实例 | 运行时由Ability内部业务决定是否创建多实例。 |
缺省情况下是singleton模式,module.json5示例如下:
diff --git a/zh-cn/application-dev/application-dev-guide.md b/zh-cn/application-dev/application-dev-guide.md
index 8340df1b0b9a61a684958a4c375d0c505ac3feea..be256c3ab7af5323710445dfa8d98cd36b0bbfe8 100644
--- a/zh-cn/application-dev/application-dev-guide.md
+++ b/zh-cn/application-dev/application-dev-guide.md
@@ -33,7 +33,7 @@
- [安全](security/userauth-overview.md)
- [网络与连接](connectivity/ipc-rpc-overview.md)
- [电话服务](telephony/telephony-overview.md)
-- [数据管理](database/database-mdds-overview.md)
+- [数据管理](database/data-mgmt-overview.md)
- [文件管理](file-management/file-management-overview.md)
- [任务管理](task-management/background-task-overview.md)
- [设备管理](device/usb-overview.md)
diff --git a/zh-cn/application-dev/application-models/Readme-CN.md b/zh-cn/application-dev/application-models/Readme-CN.md
index 1e72b5673a150e73184db163ddc5ad79005ec8f6..12ad483618be5512ca2c3f1c75cedd5602f07866 100644
--- a/zh-cn/application-dev/application-models/Readme-CN.md
+++ b/zh-cn/application-dev/application-models/Readme-CN.md
@@ -1,8 +1,8 @@
# 应用模型
- 应用模型概述
- - [OpenHarmony应用模型的构成要素](application-model-composition.md)
- - [OpenHarmony应用模型解读](application-model-description.md)
+ - [应用模型的构成要素](application-model-composition.md)
+ - [应用模型解读](application-model-description.md)
- Stage模型开发指导
- [Stage模型开发概述](stage-model-development-overview.md)
- Stage模型应用组件
diff --git a/zh-cn/application-dev/application-models/application-context-stage.md b/zh-cn/application-dev/application-models/application-context-stage.md
index b734131b18246d0ec6ce82399cca6957dd91dd45..3605144f6b1268fc26a724dded5afb70e564d2f9 100644
--- a/zh-cn/application-dev/application-models/application-context-stage.md
+++ b/zh-cn/application-dev/application-models/application-context-stage.md
@@ -84,7 +84,7 @@
| 属性名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| bundleCodeDir | string | 是 | 否 | 安装文件路径。应用在内部存储上的安装路径。 |
+| bundleCodeDir | string | 是 | 否 | 安装文件路径。应用在内部存储上的安装路径。不能拼接路径访问资源文件,请使用[资源管理接口](../reference/apis/js-apis-resource-manager.md)访问资源。 |
| cacheDir | string | 是 | 否 | 应用缓存文件路径。应用在内部存储上的缓存路径。
对应于“设置 > 应用管理”,找到对应应用的“存储”中的缓存内容。 |
| filesDir | string | 是 | 否 | 应用通用文件路径。应用在内部存储上的文件路径。
本目录下存放的文件可能会被应用迁移或者备份的时候同步到其他目录中。 |
| preferencesDir | string | 是 | 是 | 应用首选项文件路径。指示应用程序首选项目录。 |
@@ -247,7 +247,7 @@ export default class EntryAbility extends UIAbility {
在应用内的DFX统计场景中,如需要统计对应页面停留时间和访问频率等信息,可以使用订阅进程内UIAbility生命周期变化功能。
-通过[ApplicationContext](../reference/apis/js-apis-inner-application-applicationContext)提供的能力,可以订阅进程内UIAbility生命周期变化。当进程内的UIAbility生命周期变化时,如创建、可见/不可见、获焦/失焦、销毁等,会触发相应的回调函数。每次注册回调函数时,都会返回一个监听生命周期的ID,此ID会自增+1。当超过监听上限数量2^63-1时,会返回-1。以[UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md)中的使用为例进行说明。
+通过[ApplicationContext](../reference/apis/js-apis-inner-application-applicationContext.md)提供的能力,可以订阅进程内UIAbility生命周期变化。当进程内的UIAbility生命周期变化时,如创建、可见/不可见、获焦/失焦、销毁等,会触发相应的回调函数。每次注册回调函数时,都会返回一个监听生命周期的ID,此ID会自增+1。当超过监听上限数量2^63-1时,会返回-1。以[UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md)中的使用为例进行说明。
```ts
diff --git a/zh-cn/application-dev/application-models/component-startup-rules-fa.md b/zh-cn/application-dev/application-models/component-startup-rules-fa.md
index 15dcd2e6b42acf2d33ae877b3364d72a0cb42607..e5d4cb541b39af727c7721b9469cae606d9f56b2 100644
--- a/zh-cn/application-dev/application-models/component-startup-rules-fa.md
+++ b/zh-cn/application-dev/application-models/component-startup-rules-fa.md
@@ -24,8 +24,8 @@
- **跨应用启动组件,需校验目标组件Visible**
- 只针对跨应用场景
- - 若目标组件exported字段配置为false,则需校验`ohos.permission.START_INVISIBLE_ABILITY`权限
- - [组件exported配置参考](../quick-start/module-configuration-file.md#abilities标签)
+ - 若目标组件visible字段配置为false,则需校验`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - [组件visible配置参考](../quick-start/module-configuration-file.md#abilities标签)
- **位于后台的应用,启动组件需校验BACKGROUND权限**
- 应用前后台判断标准:若应用进程获焦或所属的UIAbility位于前台则判定为前台应用,否则为后台应用
diff --git a/zh-cn/application-dev/application-models/create-pageability.md b/zh-cn/application-dev/application-models/create-pageability.md
index 2e33384edda2ade9d40b92f62bde369163f0021e..c653379c1c938e6fd595f3acd4f66b5061be577b 100644
--- a/zh-cn/application-dev/application-models/create-pageability.md
+++ b/zh-cn/application-dev/application-models/create-pageability.md
@@ -47,7 +47,7 @@ PageAbility创建成功后,其abilities相关的配置项在config.json中体
}
],
"orientation": "unspecified",
- "exported": true,
+ "visible": true,
"srcPath": "EntryAbility",
"name": ".EntryAbility",
"srcLanguage": "ets",
diff --git a/zh-cn/application-dev/application-models/create-serviceability.md b/zh-cn/application-dev/application-models/create-serviceability.md
index f1152b65ebac9cb005f6ae6710b2e1fb3e7cc843..2fb1b03cc53a166951c620ff31986a9fd5652a95 100644
--- a/zh-cn/application-dev/application-models/create-serviceability.md
+++ b/zh-cn/application-dev/application-models/create-serviceability.md
@@ -40,7 +40,7 @@
2. 注册ServiceAbility。
- ServiceAbility需要在应用配置文件config.json中进行注册,注册类型type需要设置为service。"exported"属性表示ServiceAbility是否可以被其他应用调用,true表示可以被其他应用调用,false表示不能被其他应用调用(仅应用内可以调用)。若ServiceAbility需要被其他应用调用,注册ServiceAbility时需要设置"exported"为true,同时需要设置支持关联启动。ServiceAbility的启动规则详见[组件启动规则](component-startup-rules.md)章节。
+ ServiceAbility需要在应用配置文件config.json中进行注册,注册类型type需要设置为service。"visible"属性表示ServiceAbility是否可以被其他应用调用,true表示可以被其他应用调用,false表示不能被其他应用调用(仅应用内可以调用)。若ServiceAbility需要被其他应用调用,注册ServiceAbility时需要设置"visible"为true,同时需要设置支持关联启动。ServiceAbility的启动规则详见[组件启动规则](component-startup-rules.md)章节。
```json
{
@@ -53,7 +53,7 @@
"icon": "$media:icon",
"description": "hap sample empty service",
"type": "service",
- "exported": true
+ "visible": true
}
]
}
diff --git a/zh-cn/application-dev/application-models/dataability-configuration.md b/zh-cn/application-dev/application-models/dataability-configuration.md
index 5708ec04e53c3d7101f13b419a4bb9250866d2f2..88b57ca8f5b8b9f999adcdfc5b4eabe795eaa7f8 100644
--- a/zh-cn/application-dev/application-models/dataability-configuration.md
+++ b/zh-cn/application-dev/application-models/dataability-configuration.md
@@ -38,7 +38,7 @@ URI示例:
| "name" | Ability名称。 |
| "type" | UIAbility类型,DataAbility的类型为"data"。 |
| "uri" | 通信使用的URI。 |
-| "exported" | 对其他应用是否可见,设置为true时,DataAbility才能与其他应用进行通信传输数据。 |
+| "visible" | 对其他应用是否可见,设置为true时,DataAbility才能与其他应用进行通信传输数据。 |
config.json配置样例
@@ -51,7 +51,7 @@ config.json配置样例
"srcLanguage": "ets",
"description": "$string:description_dataability",
"type": "data",
- "exported": true,
+ "visible": true,
"uri": "dataability://ohos.samples.etsdataability.DataAbility"
}]
```
diff --git a/zh-cn/application-dev/application-models/dataability-permission-control.md b/zh-cn/application-dev/application-models/dataability-permission-control.md
index 9d1a460a01cbb83f15084b161ecd4a4239bc8f6f..6e377d16fc71ba83cc394c42b11c97583497f0cc 100644
--- a/zh-cn/application-dev/application-models/dataability-permission-control.md
+++ b/zh-cn/application-dev/application-models/dataability-permission-control.md
@@ -17,7 +17,7 @@ DataAbility作为服务端,在被拉起的时候,会根据config.json里面
"srcLanguage": "ets",
"description": "$string:description_dataability",
"type": "data",
- "exported": true,
+ "visible": true,
"uri": "dataability://ohos.samples.etsdataability.DataAbility",
"readPermission":"ohos.permission.READ_CONTACTS",
"writePermission":"ohos.permission.WRITE_CONTACTS"
diff --git a/zh-cn/application-dev/application-models/datashareextensionability.md b/zh-cn/application-dev/application-models/datashareextensionability.md
index d051ef1705c2d346c8e3c4082f8ede0aa55ffaec..9b20dbce43e538872b6a6f117f87fce6a8391e20 100644
--- a/zh-cn/application-dev/application-models/datashareextensionability.md
+++ b/zh-cn/application-dev/application-models/datashareextensionability.md
@@ -1,4 +1,4 @@
# DataShareExtensionAbility(仅对系统应用开放)
-DataShareExtensionAbility提供了数据分享的能力,系统应用可以实现一个DataShareExtensionAbility,也可以访问系统中已有的DataShareExtensionAbility,针对三方应用仅开放访问系统中已有DataShareExtensionAbility的能力,详细介绍请参见[数据共享开发指导](../database/database-datashare-guidelines.md)。
+DataShareExtensionAbility提供了数据分享的能力,系统应用可以实现一个DataShareExtensionAbility,也可以访问系统中已有的DataShareExtensionAbility,针对三方应用仅开放访问系统中已有DataShareExtensionAbility的能力,详细介绍请参见[同设备跨应用数据共享](../database/share-device-data-across-apps-overview.md)。
diff --git a/zh-cn/application-dev/application-models/figures/uiability-launch-type1.gif b/zh-cn/application-dev/application-models/figures/uiability-launch-type1.gif
new file mode 100644
index 0000000000000000000000000000000000000000..941f5de94532129d78965bb8a83b786a6ce7bcd0
Binary files /dev/null and b/zh-cn/application-dev/application-models/figures/uiability-launch-type1.gif differ
diff --git a/zh-cn/application-dev/application-models/figures/uiability-launch-type1.png b/zh-cn/application-dev/application-models/figures/uiability-launch-type1.png
deleted file mode 100644
index f282915d8c5be11fdc8ce07fb0f42b0d8c562a8c..0000000000000000000000000000000000000000
Binary files a/zh-cn/application-dev/application-models/figures/uiability-launch-type1.png and /dev/null differ
diff --git a/zh-cn/application-dev/application-models/figures/uiability-launch-type2.gif b/zh-cn/application-dev/application-models/figures/uiability-launch-type2.gif
new file mode 100644
index 0000000000000000000000000000000000000000..89a2f8b3ea5d486f74e9536442141b1822f61082
Binary files /dev/null and b/zh-cn/application-dev/application-models/figures/uiability-launch-type2.gif differ
diff --git a/zh-cn/application-dev/application-models/figures/uiability-launch-type2.png b/zh-cn/application-dev/application-models/figures/uiability-launch-type2.png
deleted file mode 100644
index f392471c0361cbf04e531b12403b7b00d773bef5..0000000000000000000000000000000000000000
Binary files a/zh-cn/application-dev/application-models/figures/uiability-launch-type2.png and /dev/null differ
diff --git a/zh-cn/application-dev/application-models/figures/uiability-launch-type3.gif b/zh-cn/application-dev/application-models/figures/uiability-launch-type3.gif
new file mode 100644
index 0000000000000000000000000000000000000000..4e9de02d3fb35798b3214f79c6458b3cbbcb4cb1
Binary files /dev/null and b/zh-cn/application-dev/application-models/figures/uiability-launch-type3.gif differ
diff --git a/zh-cn/application-dev/application-models/figures/uiability-launch-type3.png b/zh-cn/application-dev/application-models/figures/uiability-launch-type3.png
deleted file mode 100644
index 43cd96e6e4cbcc2a291e08d109d4f8958f47a1e6..0000000000000000000000000000000000000000
Binary files a/zh-cn/application-dev/application-models/figures/uiability-launch-type3.png and /dev/null differ
diff --git a/zh-cn/application-dev/application-models/lifecycleapp-switch.md b/zh-cn/application-dev/application-models/lifecycleapp-switch.md
index c49ad78ea70e4e01048065885987b87720dc9b74..d1d37d01d3f44ed1c86ccb53a461ac20bfafed32 100644
--- a/zh-cn/application-dev/application-models/lifecycleapp-switch.md
+++ b/zh-cn/application-dev/application-models/lifecycleapp-switch.md
@@ -1,17 +1,17 @@
# LifecycleApp接口切换
- | FA模型接口 | Stage模型接口对应d.ts文件 | Stage模型对应接口 |
+| FA模型接口 | Stage模型接口对应d.ts文件 | Stage模型对应接口 |
| -------- | -------- | -------- |
| onShow?(): void; | \@ohos.window.d.ts | [on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType>): void;](../reference/apis/js-apis-window.md#onwindowstageevent9)
监听[FOREGROUND](../reference/apis/js-apis-window.md#windowstageeventtype9)切到前台状态 |
| onHide?(): void; | \@ohos.window.d.ts | [on(eventType: 'windowStageEvent', callback: Callback<WindowStageEventType>): void;](../reference/apis/js-apis-window.md#onwindowstageevent9)
监听[BACKGROUND](../reference/apis/js-apis-window.md#windowstageeventtype9)切到后台状态 |
-| onDestroy?(): void; | \@ohos.app.ability.UIAbility.d.ts | [onDestroy(): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityondestroy) |
+| onDestroy?(): void; | \@ohos.app.ability.UIAbility.d.ts | [onDestroy(): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityondestroy) |
| onCreate?(): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, param: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate) |
| onWindowDisplayModeChanged?(isShownInMultiWindow: boolean, newConfig: resourceManager.Configuration): void; | Stage模型无对应接口 | 暂时未提供对应接口 |
| onStartContinuation?(): boolean; | Stage模型无对应接口 | Stage模型上,应用无需感知迁移是否成功(由应用发起迁移请求时感知),onStartContinuation废弃 |
| onSaveData?(data: Object): boolean; | \@ohos.app.ability.UIAbility.d.ts | [onContinue(wantParam : {[key: string]: any}): AbilityConstant.OnContinueResult;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncontinue) |
| onCompleteContinuation?(result: number): void; | application\ContinueCallback.d.ts | [onContinueDone(result: number): void;](../reference/apis/js-apis-distributedMissionManager.md#continuecallback) |
-| onRestoreData?(data: Object): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, param: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate)
[onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant)
标准实例模式Ability迁移目标端在onCreate回调中完成数据恢复,单实例应用迁移目标端在onCreate回调中完成数据恢复,回调中通过判断launchParam.launchReason可获取迁移启动的场景,从而可以从Want中获取迁移前保存的数据 |
+| onRestoreData?(data: Object): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, param: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate)
[onNewWant(want: Want, launchParams: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant)
多实例模式Ability迁移目标端在onCreate回调中完成数据恢复,单实例模式应用迁移目标端在onCreate回调中完成数据恢复,回调中通过判断launchParam.launchReason可获取迁移启动的场景,从而可以从Want中获取迁移前保存的数据 |
| onRemoteTerminated?(): void; | application\ContinueCallback.d.ts | [onContinueDone(result: number): void;](../reference/apis/js-apis-distributedMissionManager.md#continuecallback) |
| onSaveAbilityState?(outState: PacMap): void; | \@ohos.app.ability.UIAbility.d.ts | [onSaveState(reason: AbilityConstant.StateType, wantParam : {[key: string]: any}): AbilityConstant.OnSaveResult;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonsavestate) |
| onRestoreAbilityState?(inState: PacMap): void; | \@ohos.app.ability.UIAbility.d.ts | [onCreate(want: Want, param: AbilityConstant.LaunchParam): void;](../reference/apis/js-apis-app-ability-uiAbility.md#abilityoncreate)
应用重启后会触发Ability的onCreate方法,通过判断launchParam.launchReason可获取自恢复的场景,从而可以从Want中获取重启前保存的数据 |
diff --git a/zh-cn/application-dev/application-models/mission-set-icon-name-for-task-snapshot.md b/zh-cn/application-dev/application-models/mission-set-icon-name-for-task-snapshot.md
index 8698bbfff4bdf2202a1198c8c4182445537ca642..e0ff7f945c0bd09e8b12997b14d69acfa9e26cd7 100644
--- a/zh-cn/application-dev/application-models/mission-set-icon-name-for-task-snapshot.md
+++ b/zh-cn/application-dev/application-models/mission-set-icon-name-for-task-snapshot.md
@@ -7,7 +7,7 @@
图1 UIAbility对应的任务快照

-也可以使用[UIAbilityContext.setMissionIcon()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissionicon)和[UIAbilityContext.setMissionLabel()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissionlabel)方法,根据需要自定义任务快照的图标和名称。例如,对于UIAbility的标准实例启动模式,可以根据不同的功能配置相应的任务快照的图标和名称。
+也可以使用[UIAbilityContext.setMissionIcon()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissionicon)和[UIAbilityContext.setMissionLabel()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissionlabel)方法,根据需要自定义任务快照的图标和名称。例如,对于UIAbility的多实例启动模式,可以根据不同的功能配置相应的任务快照的图标和名称。
本文将从以下两个方面介绍。
diff --git a/zh-cn/application-dev/application-models/pageability-launch-type.md b/zh-cn/application-dev/application-models/pageability-launch-type.md
index 8e666167314e1c1af2274ff7b54ba0549968809d..38b0c82c58ac39afbf598476069e545e536197a1 100644
--- a/zh-cn/application-dev/application-models/pageability-launch-type.md
+++ b/zh-cn/application-dev/application-models/pageability-launch-type.md
@@ -1,7 +1,7 @@
# PageAbility的启动模式
-启动模式对应PageAbility被启动时的行为,支持单实例模式、标准模式两种启动模式。
+启动模式对应PageAbility被启动时的行为,支持单实例模式、多实例模式两种启动模式。
**表1** PageAbility的启动模式
@@ -9,7 +9,7 @@
| 启动模式 | 描述 | 说明 |
| -------- | -------- | -------- |
| singleton | 单实例模式 | 每次调用startAbility方法时,如果应用进程中该类型的Ability实例已经存在,则复用已有的实例,系统中只存在唯一一个实例。表现为在最近任务列表中只有一个Ability实例。
典型场景:当用户打开视频播放应用并观看视频,回到桌面后,再次打开视频播放应用,应用仍为回到桌面之前正在观看的视频。 |
-| multiton | 标准模式 | 缺省启动模式。每次调用startAbility方法时,都会在应用进程中创建一个新的Ability实例。表现为在最近任务列表中可以看到有多个该类型的Ability实例。
典型场景:当用户打开文档应用,选择新建文档的时候,每次点击新建文档,都会创建一个新的文档任务,在最近任务列表中可以看到多个新建的文档任务。 |
+| standard | 多实例模式 | 缺省启动模式。每次调用startAbility方法时,都会在应用进程中创建一个新的Ability实例。表现为在最近任务列表中可以看到有多个该类型的Ability实例。
典型场景:当用户打开文档应用,选择新建文档的时候,每次点击新建文档,都会创建一个新的文档任务,在最近任务列表中可以看到多个新建的文档任务。 |
应用开发者可在config.json配置文件中通过“launchType”配置启动模式。示例如下:
@@ -21,8 +21,8 @@
"abilities": [
{
// singleton: 单实例模式
- // multiton: 标准模式
- "launchType": "multiton",
+ // standard: 多实例模式
+ "launchType": "standard",
// ...
}
]
@@ -31,7 +31,7 @@
```
-启动PageAbility时,对于标准启动模式(多实例启动模式)以及单实例启动模式首次启动,[PageAbility生命周期回调](pageability-lifecycle.md#table13118194914476)均会被触发。单实例非首次启动时不会再触发onCreate()接口,而是触发onNewWant(),onNewWant()的说明如下表2所示。
+启动PageAbility时,对于多实例模式启动,以及单实例模式进行首次启动时,,[PageAbility生命周期回调](pageability-lifecycle.md#table13118194914476)均会被触发。单实例非首次启动时不会再触发onCreate()接口,而是触发onNewWant(),onNewWant()的说明如下表2所示。
**表2** 单实例启动模式特有的回调函数说明
diff --git a/zh-cn/application-dev/application-models/redirection-rules.md b/zh-cn/application-dev/application-models/redirection-rules.md
index 86e36b0983256546465a380fa5a5c0271416165e..59424cf042861c70b31cffe0a62735458ad6ed3a 100644
--- a/zh-cn/application-dev/application-models/redirection-rules.md
+++ b/zh-cn/application-dev/application-models/redirection-rules.md
@@ -7,14 +7,14 @@
PageAbility作为可见Ability,可以通过startAbility启动有界面的且对外可见的Ability。
-应用可通过在config.json中设置"abilities"中的"exported"属性设置Ability是否可由其他应用的组件启动,"exported"属性的具体参数和意义如下表所示。
+应用可通过在config.json中设置"abilities"中的"visible"属性设置Ability是否可由其他应用的组件启动,"visible"属性的具体参数和意义如下表所示。
- **表1** exported属性说明
+ **表1** visible属性说明
| 属性名称 | 描述 | 是否可缺省 |
| -------- | -------- | -------- |
-| exported | 表示Ability是否可以被其他应用调用。
true:该Ability可以被任何应用调用。
false:该Ability只能被同一应用的其他组件调用。 | 可缺省,缺省时默认属性值为"false"。 |
+| visible | 表示Ability是否可以被其他应用调用。
true:该Ability可以被任何应用调用。
false:该Ability只能被同一应用的其他组件调用。 | 可缺省,缺省时默认属性值为"false"。 |
如果需设置当前Ability可由任何应用访问,对应config.json文件的示例代码如下所示:
@@ -25,7 +25,7 @@ PageAbility作为可见Ability,可以通过startAbility启动有界面的且
// ...
"abilities": [
{
- "exported": "true",
+ "visible": "true",
// ...
}
]
@@ -34,4 +34,4 @@ PageAbility作为可见Ability,可以通过startAbility启动有界面的且
```
-如果应用中的Ability包含skills过滤器,建议此属性设置为"true",以允许其他应用通过[隐式调用](explicit-implicit-want-mappings.md)启动该Ability。如果此属性设为"false",其他应用尝试启动该Ability时系统会返回PERMISSION_DENIED。这种情况下系统应用可以通过申请[START_INVISIBLE_ABILITY](../security/permission-list.md)权限启动exported为false的组件,例如系统桌面、语音助手、搜索助手等。
+如果应用中的Ability包含skills过滤器,建议此属性设置为"true",以允许其他应用通过[隐式调用](explicit-implicit-want-mappings.md)启动该Ability。如果此属性设为"false",其他应用尝试启动该Ability时系统会返回PERMISSION_DENIED。这种情况下系统应用可以通过申请[START_INVISIBLE_ABILITY](../security/permission-list.md)权限启动visible为false的组件,例如系统桌面、语音助手、搜索助手等。
diff --git a/zh-cn/application-dev/application-models/start-page.md b/zh-cn/application-dev/application-models/start-page.md
index 3796a710438f415ecaaad00dbb884bb13e11644a..fb2c8c2ffec52b21740d646566d48d7b1d7aa325 100644
--- a/zh-cn/application-dev/application-models/start-page.md
+++ b/zh-cn/application-dev/application-models/start-page.md
@@ -70,7 +70,7 @@ struct Index {
```
-当PageAbility的启动模式设置为标准模式或为首次启动单例模式的PageAbility时(具体设置方法和典型场景示例见[PageAbility的启动模式](pageability-launch-type.md)),在调用方PageAbility中,通过want中的parameters参数传递要启动的指定页面的pages信息,调用startAbility()方法启动PageAbility。被调用方可以在onCreate中使用featureAbility的getWant方法获取want,再通过调用router.push实现启动指定页面。
+当PageAbility的启动模式设置为多实例模式或为首次启动单例模式的PageAbility时(具体设置方法和典型场景示例见[PageAbility的启动模式](pageability-launch-type.md)),在调用方PageAbility中,通过want中的parameters参数传递要启动的指定页面的pages信息,调用startAbility()方法启动PageAbility。被调用方可以在onCreate中使用featureAbility的getWant方法获取want,再通过调用router.push实现启动指定页面。
调用方的页面中实现按钮点击触发startAbility方法启动目标端PageAbility,startAbility方法的入参want中携带指定页面信息,示例代码如下:
diff --git a/zh-cn/application-dev/application-models/uiability-intra-device-interaction.md b/zh-cn/application-dev/application-models/uiability-intra-device-interaction.md
index fafbe6935b781117851968f32e87ad339fcfc252..43cd394dc79795c47c07227e35589b396f8ae266 100644
--- a/zh-cn/application-dev/application-models/uiability-intra-device-interaction.md
+++ b/zh-cn/application-dev/application-models/uiability-intra-device-interaction.md
@@ -486,7 +486,7 @@ export default class FuncAbility extends UIAbility {
```
> **说明:**
-> 当被调用方[UIAbility组件启动模式](uiability-launch-type.md)设置为standard启动模式时,每次启动都会创建一个新的实例,那么[onNewWant()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant)回调就不会被用到。
+> 当被调用方[UIAbility组件启动模式](uiability-launch-type.md)设置为multiton启动模式时,每次启动都会创建一个新的实例,那么[onNewWant()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant)回调就不会被用到。
## 通过Call调用实现UIAbility交互(仅对系统应用开放)
diff --git a/zh-cn/application-dev/application-models/uiability-launch-type.md b/zh-cn/application-dev/application-models/uiability-launch-type.md
index 531464065f819d1d0f6c278c228aa666ae257bb9..f806a642db085e84dedcdee359a13505b7f5557d 100644
--- a/zh-cn/application-dev/application-models/uiability-launch-type.md
+++ b/zh-cn/application-dev/application-models/uiability-launch-type.md
@@ -6,7 +6,7 @@ UIAbility的启动模式是指UIAbility实例在启动时的不同呈现状态
- [singleton(单实例模式)](#singleton启动模式)
-- [multiton(标准实例模式)](#multiton启动模式)
+- [multiton(多实例模式)](#multiton启动模式)
- [specified(指定实例模式)](#specified启动模式)
@@ -17,8 +17,8 @@ singleton启动模式为单实例模式,也是默认情况下的启动模式
每次调用[startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)方法时,如果应用进程中该类型的UIAbility实例已经存在,则复用系统中的UIAbility实例。系统中只存在唯一一个该UIAbility实例,即在最近任务列表中只存在一个该类型的UIAbility实例。
-**图1** 单实例模式演示效果
-
+**图1** 单实例模式演示效果
+
> **说明**:应用的UIAbility实例已创建,该UIAbility配置为单实例模式,再次调用[startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)方法启动该UIAbility实例。由于启动的还是原来的UIAbility实例,并未重新创建一个新的UIAbility实例,此时只会进入该UIAbility的[onNewWant()](../reference/apis/js-apis-app-ability-uiAbility.md#abilityonnewwant)回调,不会进入其[onCreate()](../reference/apis/js-apis-app-ability-uiAbility.md#uiabilityoncreate)和[onWindowStageCreate()](../reference/apis/js-apis-app-ability-uiAbility.md#uiabilityonwindowstagecreate)生命周期回调。
@@ -42,10 +42,10 @@ singleton启动模式为单实例模式,也是默认情况下的启动模式
## multiton启动模式
-multiton启动模式为标准实例模式,每次调用[startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)方法时,都会在应用进程中创建一个新的该类型UIAbility实例。即在最近任务列表中可以看到有多个该类型的UIAbility实例。这种情况下可以将UIAbility配置为multiton(标准实例模式)。
+multiton启动模式为多实例模式,每次调用[startAbility()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextstartability)方法时,都会在应用进程中创建一个新的该类型UIAbility实例。即在最近任务列表中可以看到有多个该类型的UIAbility实例。这种情况下可以将UIAbility配置为multiton(多实例模式)。
-**图2** 标准实例模式演示效果
-
+**图2** 多实例模式演示效果
+
multiton启动模式的开发使用,在[module.json5配置文件](../quick-start/module-configuration-file.md)中的`launchType`字段配置为`multiton`即可。
@@ -69,8 +69,8 @@ multiton启动模式的开发使用,在[module.json5配置文件](../quick-sta
specified启动模式为指定实例模式,针对一些特殊场景使用(例如文档应用中每次新建文档希望都能新建一个文档实例,重复打开一个已保存的文档希望打开的都是同一个文档实例)。
-**图3** 指定实例模式演示效果
-
+**图3** 指定实例模式演示效果
+
例如有两个UIAbility:EntryAbility和SpecifiedAbility,SpecifiedAbility配置为指定实例模式启动,需要从EntryAbility的页面中启动SpecifiedAbility。
diff --git a/zh-cn/application-dev/application-models/widget-development-fa.md b/zh-cn/application-dev/application-models/widget-development-fa.md
index 921903c0c6e36368880ae5876498cff44cbbbcb5..8278000a12195515820ec2877fc8122e9f3433c9 100644
--- a/zh-cn/application-dev/application-models/widget-development-fa.md
+++ b/zh-cn/application-dev/application-models/widget-development-fa.md
@@ -321,7 +321,7 @@ async function deleteFormInfo(formId: string) {
// ...
```
-具体的持久化方法可以参考[轻量级数据存储开发指导](../database/database-preference-guidelines.md)。
+具体的持久化方法可以参考[数据管理开发指导](../database/app-data-persistence-overview.md)。
需要注意的是,卡片使用方在请求卡片时传递给提供方应用的Want数据中存在临时标记字段,表示此次请求的卡片是否为临时卡片:
diff --git a/zh-cn/application-dev/database/figures/relationStore_local.jpg b/zh-cn/application-dev/database/figures/relationStore_local.jpg
index c6b69c19565a7c7b05b57eb5a3cf303d05c82d0e..9f5a2b951e82792ac69bd8d11422219f9299d983 100644
Binary files a/zh-cn/application-dev/database/figures/relationStore_local.jpg and b/zh-cn/application-dev/database/figures/relationStore_local.jpg differ
diff --git a/zh-cn/application-dev/database/share-device-data-across-apps-overview.md b/zh-cn/application-dev/database/share-device-data-across-apps-overview.md
index 1dc4ae9e99e5712af37f1311caa9c50a1cd2f748..79febf4b4653891bb2587ab4665bca2fdf4790e6 100644
--- a/zh-cn/application-dev/database/share-device-data-across-apps-overview.md
+++ b/zh-cn/application-dev/database/share-device-data-across-apps-overview.md
@@ -12,11 +12,13 @@
跨应用数据共享有两种方式:
- **使用DataShareExtensionAbility实现数据共享**
+
这种方式通过在HAP中实现一个extension,在extension中可以实现回调,在访问方调用对应接口时,会自动拉起提供方对应的extension,并调用对应回调。
这种方式适用于跨应用数据访问时有业务的操作,不仅是对数据库的增删改查的情况。
- **通过静默访问实现数据共享**
+
这种方式通过在HAP中配置数据库的访问规则,在访问方调用对应接口时,会自动通过系统服务读取HAP配置规则,按照规则返回数据,不会拉起数据提供方。
这种方式适用于跨应用数据访问仅为数据库的增删改查,没有特殊业务的情况。
diff --git a/zh-cn/application-dev/database/sync-app-data-across-devices-overview.md b/zh-cn/application-dev/database/sync-app-data-across-devices-overview.md
index c4d09d08da110e5f5e8c658a41ad808f47317bcb..4f1faa0c8ad2b3db42833790983760b558157279 100644
--- a/zh-cn/application-dev/database/sync-app-data-across-devices-overview.md
+++ b/zh-cn/application-dev/database/sync-app-data-across-devices-overview.md
@@ -7,13 +7,13 @@
例如:当设备1上的应用A在分布式数据库中增、删、改数据后,设备2上的应用A也可以获取到该数据库变化。可在分布式图库、备忘录、联系人、文件管理器等场景中使用。
-不同应用间订阅数据库变化通知,请参考[同设备跨应用数据共享](share-device-data-across-apps-overview.md)实现。
+不同应用间订阅数据库变化通知,则请参考[同设备跨应用数据共享](share-device-data-across-apps-overview.md)实现。
-根据跨设备同步数据生命周期不同,可以分为:
+根据跨设备同步数据生命周期的不同,可以分为:
-- 临时数据生命周期较短,通常保存内存中。比如游戏应用产生的过程数据,建议使用分布式数据对象;
+- 临时数据生命周期较短,通常保存到内存中。比如游戏应用产生的过程数据,建议使用分布式数据对象。
-- 持久数据生命周期较长,需要保存到存储的数据库中,根据数据关系和特点,选择关系型或者键值型数据库。比如图库应用的各种相册、封面、图片等属性信息,建议使用关系型数据库;图库应用的具体图片缩略图,建议使用键值型数据库。
+- 持久数据生命周期较长,需要保存到存储的数据库中,根据数据关系和特点,可以选择关系型数据库或者键值型数据库。比如图库应用的各种相册、封面、图片等属性信息,建议使用关系型数据库;图库应用的具体图片缩略图,建议使用键值型数据库。
## 基本概念
diff --git a/zh-cn/application-dev/dfx/apprecovery-guidelines.md b/zh-cn/application-dev/dfx/apprecovery-guidelines.md
index 7733738e30e1f3dba3fa05c970fbf1869df2ee29..c3df1e3aed2d5a522e28497ce1c0c724ac9aca65 100644
--- a/zh-cn/application-dev/dfx/apprecovery-guidelines.md
+++ b/zh-cn/application-dev/dfx/apprecovery-guidelines.md
@@ -222,3 +222,20 @@ export default class EntryAbility extends Ability {
}
```
+#### 故障Ability的重启恢复标记
+
+发生故障的Ability再次重新启动时,在调度onCreate生命周期里,参数want的parameters成员会有[ABILITY_RECOVERY_RESTART](../reference/apis/js-apis-app-ability-wantConstant.md#wantconstantparams)标记数据,并且值为true。
+
+```ts
+import UIAbility from '@ohos.app.ability.UIAbility';
+import wantConstant from '@ohos.app.ability.wantConstant';
+export default class EntryAbility extends UIAbility {
+ onCreate(want, launchParam) {
+ if (want.parameters[wantConstant.Params.ABILITY_RECOVERY_RESTART] != undefined &&
+ want.parameters[wantConstant.Params.ABILITY_RECOVERY_RESTART] == true) {
+ console.log("This ability need to recovery");
+ }
+ }
+}
+```
+
diff --git a/zh-cn/application-dev/file-management/app-sandbox-directory.md b/zh-cn/application-dev/file-management/app-sandbox-directory.md
index f0724bdefac2eacbe3adbec572d27a237ba77c50..1598808622ee08419d843546ba094cbc7ee58c55 100644
--- a/zh-cn/application-dev/file-management/app-sandbox-directory.md
+++ b/zh-cn/application-dev/file-management/app-sandbox-directory.md
@@ -64,7 +64,7 @@
| 目录名 | Context属性名称 | 类型 | 说明 |
| -------- | -------- | -------- | -------- |
- | bundle | bundleCodeDir | 安装文件路径 | 应用安装后的app的hap资源包所在目录;随应用卸载而清理。 |
+ | bundle | bundleCodeDir | 安装文件路径 | 应用安装后的app的hap资源包所在目录;随应用卸载而清理。不能拼接路径访问资源文件,请使用[资源管理接口](../reference/apis/js-apis-resource-manager.md)访问资源。 |
| base | NA | 本设备文件路径 | 应用在本设备上存放持久化数据的目录,子目录包含files/、cache/、temp/和haps/;随应用卸载而清理。 |
| database | databaseDir | 数据库路径 | 应用在el1加密条件下存放通过分布式数据库服务操作的文件目录;随应用卸载而清理。 |
| distributedfiles | distributedFilesDir | 分布式文件路径 | 应用在el2加密条件下存放分布式文件的目录,应用将文件放入该目录可分布式跨设备直接访问;随应用卸载而清理。 |
diff --git a/zh-cn/application-dev/file-management/distributed-fs-overview.md b/zh-cn/application-dev/file-management/distributed-fs-overview.md
index e9507db47ad53fe24e164ed054677adbcff24781..97af1b3bdce8a2dc4863dba3a432289a7c77a4fd 100644
--- a/zh-cn/application-dev/file-management/distributed-fs-overview.md
+++ b/zh-cn/application-dev/file-management/distributed-fs-overview.md
@@ -1,6 +1,6 @@
# 分布式文件系统概述
-分布式文件系统(hmdfs,Harmony Distributed File System)提供跨设备的文件访问能力,适用于如下场景:
+分布式文件系统(hmdfs,OpenHarmony Distributed File System)提供跨设备的文件访问能力,适用于如下场景:
- 两台设备组网,用户可以利用一台设备上的编辑软件编辑另外一台设备上的文档。
diff --git a/zh-cn/application-dev/media/audio-call-development.md b/zh-cn/application-dev/media/audio-call-development.md
index fc3fa68da197a5fc1d72b6009328c20e07b65ad6..397ed6372921128db7dc8820c8069e53b2326801 100644
--- a/zh-cn/application-dev/media/audio-call-development.md
+++ b/zh-cn/application-dev/media/audio-call-development.md
@@ -8,13 +8,13 @@
## 使用AudioRenderer播放对端的通话声音
- 该过程与[使用AudioRenderer开发音频播放功能](using-audiorenderer-for-playback.md)过程相似,关键区别在于audioRenderInfo参数和音频数据来源。audioRenderInfo参数中,音频内容类型需设置为语音,CONTENT_TYPE_SPEECH,音频流使用类型需设置为语音通信,STREAM_USAGE_VOICE_COMMUNICATION。
+ 该过程与[使用AudioRenderer开发音频播放功能](using-audiorenderer-for-playback.md)过程相似,关键区别在于audioRendererInfo参数和音频数据来源。audioRendererInfo参数中,音频内容类型需设置为语音,CONTENT_TYPE_SPEECH,音频流使用类型需设置为语音通信,STREAM_USAGE_VOICE_COMMUNICATION。
```ts
import audio from '@ohos.multimedia.audio';
import fs from '@ohos.file.fs';
const TAG = 'VoiceCallDemoForAudioRenderer';
-// 与使用AudioRenderer开发音频播放功能过程相似,关键区别在于audioRenderInfo参数和音频数据来源
+// 与使用AudioRenderer开发音频播放功能过程相似,关键区别在于audioRendererInfo参数和音频数据来源
export default class VoiceCallDemoForAudioRenderer {
private renderModel = undefined;
private audioStreamInfo = {
diff --git a/zh-cn/application-dev/media/audio-call-overview.md b/zh-cn/application-dev/media/audio-call-overview.md
index 93eaace16a24a560c7ff09c0d990e81d8f99489e..0a021c1a2fbc103a7a84acfb889e1dd907a4ac2e 100644
--- a/zh-cn/application-dev/media/audio-call-overview.md
+++ b/zh-cn/application-dev/media/audio-call-overview.md
@@ -14,7 +14,7 @@
应用使用音频通话相关功能时,系统会切换至与通话相关的音频场景模式([AudioScene](../reference/apis/js-apis-audio.md#audioscene8)),当前预置了多种音频场景,包括响铃、通话、语音聊天等,在不同的场景下,系统会采用不同的策略来处理音频。
-如在蜂窝通话场景中会更注重人声的清晰度。系统会使用3A算法对音频数据进行预处理,抑制通话回声,消除背景噪音,调整音量范围,从而达到清晰人声的效果。3A算法,指声学回声消除(Acoustic Echo Cancelling, AEC)、背景噪声抑制(Acitve Noise Control, ANC)、自动增益控制(Automatic Gain Control, AGC)三种音频处理算法。
+如在蜂窝通话场景中会更注重人声的清晰度。系统会使用3A算法对音频数据进行预处理,抑制通话回声,消除背景噪音,调整音量范围,从而达到清晰人声的效果。3A算法,指声学回声消除(Acoustic Echo Cancellation, AEC)、背景噪声抑制(Active Noise Control, ANC)、自动增益控制(Automatic Gain Control, AGC)三种音频处理算法。
当前预置的四种音频场景:
diff --git a/zh-cn/application-dev/media/audio-output-device-management.md b/zh-cn/application-dev/media/audio-output-device-management.md
index 45d9fd3d68a9dd0efe346ce6b0fc65272bc71b9e..192efbfa08c217912ee4ebc2bdbcb9a0538d382e 100644
--- a/zh-cn/application-dev/media/audio-output-device-management.md
+++ b/zh-cn/application-dev/media/audio-output-device-management.md
@@ -1,6 +1,6 @@
# 音频输出设备管理
-有时设备同时连接多个音频输出设备,需要指定音频输出设备进行音频播放,此时需要使用AudioRoutingManager接口进行输出设备的管理,API说明可以参考[AudioRoutingManager API文档](../reference/apis/js-apis-audio.md#audiomanager)。
+有时设备同时连接多个音频输出设备,需要指定音频输出设备进行音频播放,此时需要使用AudioRoutingManager接口进行输出设备的管理,API说明可以参考[AudioRoutingManager API文档](../reference/apis/js-apis-audio.md#audioroutingmanager9)。
## 创建AudioRoutingManager实例
diff --git a/zh-cn/application-dev/media/audio-recording-overview.md b/zh-cn/application-dev/media/audio-recording-overview.md
index 6b9dca9f9c6b40d7f0dc6c5a983df851d22d71b2..0fc4a867eb37a17bb77a75441ab5aa41e03eabba 100644
--- a/zh-cn/application-dev/media/audio-recording-overview.md
+++ b/zh-cn/application-dev/media/audio-recording-overview.md
@@ -6,7 +6,7 @@
- [AVRecorder](using-avrecorder-for-recording.md):功能较完善的音频、视频录制ArkTS/JS API,集成了音频输入录制、音频编码和媒体封装的功能。开发者可以直接调用设备硬件如麦克风录音,并生成m4a音频文件。
-- [AudioCapturer](using-audiocapturer-for-recording.md):用于音频输入的的ArkTS/JS API,仅支持PCM格式,需要应用持续读取音频数据进行工作。应用可以在音频输出后添加数据处理,要求开发者具备音频处理的基础知识,适用于更专业、更多样化的媒体播放应用开发。
+- [AudioCapturer](using-audiocapturer-for-recording.md):用于音频输入的的ArkTS/JS API,仅支持PCM格式,需要应用持续读取音频数据进行工作。应用可以在音频输出后添加数据处理,要求开发者具备音频处理的基础知识,适用于更专业、更多样化的媒体录制应用开发。
- [OpenSLES](using-opensl-es-for-recording.md):一套跨平台标准化的音频Native API,目前阶段唯一的音频类Native API,同样提供音频输入原子能力,仅支持PCM格式,适用于从其他嵌入式平台移植,或依赖在Native层实现音频输入功能的录音应用使用。
diff --git a/zh-cn/application-dev/media/audio-recording-stream-management.md b/zh-cn/application-dev/media/audio-recording-stream-management.md
index 801876008a7824085479664edd8e721695591b19..f7739a00c474f1a1f21ad4c0629f8d453a91d862 100644
--- a/zh-cn/application-dev/media/audio-recording-stream-management.md
+++ b/zh-cn/application-dev/media/audio-recording-stream-management.md
@@ -1,10 +1,10 @@
# 音频录制流管理
-对于播放音频类的应用,开发者需要关注该应用的音频流的状态以做出相应的操作,比如监听到状态为结束时,及时提示用户录制已结束。
+对于录制音频类的应用,开发者需要关注该应用的音频流的状态以做出相应的操作,比如监听到状态为结束时,及时提示用户录制已结束。
## 读取或监听应用内音频流状态变化
-参考[使用AudioCapturer开发音频录制功能](using-audiocapturer-for-recording.md)或[audio.createAudioCapturer](../reference/apis/js-apis-audio.md#audiocreateaudiocapturer8),完成AudioRenderer的创建,然后可以通过以下两种方式查看音频流状态的变化:
+参考[使用AudioCapturer开发音频录制功能](using-audiocapturer-for-recording.md)或[audio.createAudioCapturer](../reference/apis/js-apis-audio.md#audiocreateaudiocapturer8),完成AudioCapturer的创建,然后可以通过以下两种方式查看音频流状态的变化:
- 方法1:直接查看AudioCapturer的[state](../reference/apis/js-apis-audio.md#属性):
diff --git a/zh-cn/application-dev/media/mic-management.md b/zh-cn/application-dev/media/mic-management.md
index f8fe096ee24b6484066135bf9fada876d60c839c..575271681514dcadfda8e2ed8047324a66000c9a 100644
--- a/zh-cn/application-dev/media/mic-management.md
+++ b/zh-cn/application-dev/media/mic-management.md
@@ -44,7 +44,7 @@
}
```
-4. 根据查询结果的实际情况,调用setMicrophoneMute设置麦克风静音状态,入参输入true为静音,false为非静音。设置成功返回true,否则返回false。
+4. 根据查询结果的实际情况,调用setMicrophoneMute设置麦克风静音状态,入参输入true为静音,false为非静音。
```ts
async function setMicrophoneMuteTrue() { //设置麦克风静音,入参为true
diff --git a/zh-cn/application-dev/media/using-audiocapturer-for-recording.md b/zh-cn/application-dev/media/using-audiocapturer-for-recording.md
index 189093159072f5ad7b987ba493ed8d2e5cc1d990..76548cbe10a909340cddf0d1e570d4de08e10139 100644
--- a/zh-cn/application-dev/media/using-audiocapturer-for-recording.md
+++ b/zh-cn/application-dev/media/using-audiocapturer-for-recording.md
@@ -147,7 +147,7 @@ export default class AudioCapturerDemo {
// 开始一次音频采集
async start() {
let stateGroup = [audio.AudioState.STATE_PREPARED, audio.AudioState.STATE_PAUSED, audio.AudioState.STATE_STOPPED];
- if (stateGroup.indexOf(this.audioCapturer.state) === -1) { // 当且仅当状态为prepared、paused和stopped之一时才能启动采集
+ if (stateGroup.indexOf(this.audioCapturer.state) === -1) { // 当且仅当状态为STATE_PREPARED、STATE_PAUSED和STATE_STOPPED之一时才能启动采集
console.error(`${TAG}: start failed`);
return;
}
diff --git a/zh-cn/application-dev/media/using-avrecorder-for-recording.md b/zh-cn/application-dev/media/using-avrecorder-for-recording.md
index f3c62923a7fa5ed418c1c18a8d316e893d9fa25d..98c9c4633eb25462ed4d8a6f09ab78a7b9883b4e 100644
--- a/zh-cn/application-dev/media/using-avrecorder-for-recording.md
+++ b/zh-cn/application-dev/media/using-avrecorder-for-recording.md
@@ -31,8 +31,8 @@
2. 设置业务需要的监听事件,监听状态变化及错误上报。
| 事件类型 | 说明 |
| -------- | -------- |
- | stateChange | 必要事件,监听播放器的state属性改变 |
- | error | 必要事件,监听播放器的错误信息 |
+ | stateChange | 必要事件,监听AVRecorder的state属性改变 |
+ | error | 必要事件,监听AVRecorder的错误信息 |
```ts
diff --git a/zh-cn/application-dev/media/using-opensl-es-for-recording.md b/zh-cn/application-dev/media/using-opensl-es-for-recording.md
index 5dc7772809f8e552ecb7e139d3ef5e1eaada06fb..70e57a8fa95e23509736329dd7ccc88a8d3420c1 100644
--- a/zh-cn/application-dev/media/using-opensl-es-for-recording.md
+++ b/zh-cn/application-dev/media/using-opensl-es-for-recording.md
@@ -1,10 +1,10 @@
-# 使用OpenSLES开发音频录制功能
+# 使用OpenSL ES开发音频录制功能
OpenSL ES全称为Open Sound Library for Embedded Systems,是一个嵌入式、跨平台、免费的音频处理库。为嵌入式移动多媒体设备上的应用开发者提供标准化、高性能、低延迟的API。OpenHarmony的Native API基于[Khronos Group](https://www.khronos.org/)开发的[OpenSL ES](https://www.khronos.org/opensles/) 1.0.1 API 规范实现,开发者可以通过<OpenSLES.h>和<OpenSLES_OpenHarmony.h>在OpenHarmony上使用相关API。
## OpenHarmony上的OpenSL ES
-OpenSL ES中提供了以下的接口,OpenHarmony当前仅实现了部分[接口](https://gitee.com/openharmony/third_party_opensles/blob/master/api/1.0.1/OpenSLES.h),可以实现音频播放的基础功能。
+OpenSL ES中提供了以下的接口,OpenHarmony当前仅实现了部分[接口](https://gitee.com/openharmony/third_party_opensles/blob/master/api/1.0.1/OpenSLES.h),可以实现音频录制的基础功能。
调用未实现接口后会返回**SL_RESULT_FEATURE_UNSUPPORTED,**当前没有相关扩展可以使用。
diff --git a/zh-cn/application-dev/media/video-playback.md b/zh-cn/application-dev/media/video-playback.md
index 7bbf8400ed151eaa94a9acfd5833c0b318fe4ac4..127ae791d09ed1c214eec01672c7bb09f20cb152 100644
--- a/zh-cn/application-dev/media/video-playback.md
+++ b/zh-cn/application-dev/media/video-playback.md
@@ -16,7 +16,7 @@

-状态的详细说明请参考[AVPlayerState](../reference/apis/js-apis-media.md#avplayerstate9)。当播放处于prepared / playing / paused / compeled状态时,播放引擎处于工作状态,这需要占用系统较多的运行内存。当客户端暂时不使用播放器时,调用reset()或release()回收内存资源,做好资源利用。
+状态的详细说明请参考[AVPlayerState](../reference/apis/js-apis-media.md#avplayerstate9)。当播放处于prepared / playing / paused / completed状态时,播放引擎处于工作状态,这需要占用系统较多的运行内存。当客户端暂时不使用播放器时,调用reset()或release()回收内存资源,做好资源利用。
### 开发步骤及注意事项
@@ -32,8 +32,8 @@
| durationUpdate | 用于进度条,监听进度条长度,刷新资源时长。 |
| timeUpdate | 用于进度条,监听进度条当前位置,刷新当前时间。 |
| seekDone | 响应API调用,监听seek()请求完成情况。
当使用seek()跳转到指定播放位置后,如果seek操作成功,将上报该事件。 |
- | speedDone | 响应API调用,监听setSpeed()请求完成情况。
当使用setSpeed()跳转到指定播放位置后,如果setSpeed操作成功,将上报该事件。 |
- | volumeChange | 响应API调用,监听setVolume()请求完成情况。
当使用setVolume()跳转到指定播放位置后,如果setVolume操作成功,将上报该事件。 |
+ | speedDone | 响应API调用,监听setSpeed()请求完成情况。
当使用setSpeed()设置播放倍速后,如果setSpeed操作成功,将上报该事件。 |
+ | volumeChange | 响应API调用,监听setVolume()请求完成情况。
当使用setVolume()调节播放音量后,如果setVolume操作成功,将上报该事件。 |
| bitrateDone | 响应API调用,用于HLS协议流,监听setBitrate()请求完成情况。
当使用setBitrate()指定播放比特率后,如果setBitrate操作成功,将上报该事件。 |
| availableBitrates | 用于HLS协议流,监听HLS资源的可选bitrates,用于setBitrate()。 |
| bufferingUpdate | 用于网络播放,监听网络播放缓冲信息。 |
@@ -46,7 +46,7 @@
>
> 下面代码示例中的url仅作示意使用,开发者需根据实际情况,确认资源有效性并设置:
>
- > - 确认相应的资源文件可用,并使用应用沙箱路径访问对应资源,参考[获取应用文件路径](../application-models/application-context-stage.md#获取应用开发路径)。应用沙箱的介绍及如何向应用沙箱推送文件,请参考[文件管理](../file-management/app-sandbox-directory.md)。
+ > - 如果使用本地资源播放,必须确认相应的资源文件可用,并使用应用沙箱路径访问对应资源,参考[获取应用文件路径](../application-models/application-context-stage.md#获取应用开发路径)。应用沙箱的介绍及如何向应用沙箱推送文件,请参考[文件管理](../file-management/app-sandbox-directory.md)。
>
> - 如果使用网络播放路径,需[申请相关权限](../security/accesstoken-guidelines.md):ohos.permission.INTERNET。
>
@@ -61,9 +61,9 @@
6. 视频播控:播放play(),暂停pause(),跳转seek(),停止stop() 等操作。
-7. 调用reset()重置资源,AVPlayer重新进入idle状态,允许更换资源url。
+7. (可选)更换资源:调用reset()重置资源,AVPlayer重新进入idle状态,允许更换资源url。
-8. 调用release()销毁实例,AVPlayer进入released状态,退出播放。
+8. 退出播放:调用release()销毁实例,AVPlayer进入released状态,退出播放。
### 完整示例
diff --git a/zh-cn/application-dev/quick-start/application-configuration-file-overview-fa.md b/zh-cn/application-dev/quick-start/application-configuration-file-overview-fa.md
index 9a176a9edcdd3400517f3032af75054897f04ce0..449b54e6ed40176171c1eba58da09524a2e86099 100644
--- a/zh-cn/application-dev/quick-start/application-configuration-file-overview-fa.md
+++ b/zh-cn/application-dev/quick-start/application-configuration-file-overview-fa.md
@@ -74,7 +74,7 @@ config.json示例:
}
],
"orientation": "unspecified",
- "exported": true,
+ "visible": true,
"srcPath": "MainAbility_entry",
"name": ".MainAbility_entry",
"srcLanguage": "ets",
@@ -85,7 +85,7 @@ config.json示例:
// $string:MainAbility_entry_label为资源索引
"label": "$string:MainAbility_entry_label",
"type": "page",
- "launchType": "multiton"
+ "launchType": "standard"
}
],
"distro": {
diff --git a/zh-cn/application-dev/quick-start/figures/01.png b/zh-cn/application-dev/quick-start/figures/01.png
deleted file mode 100644
index 8342856ec6643e20a941187852e6aef3ead11010..0000000000000000000000000000000000000000
Binary files a/zh-cn/application-dev/quick-start/figures/01.png and /dev/null differ
diff --git a/zh-cn/application-dev/quick-start/figures/02.png b/zh-cn/application-dev/quick-start/figures/02.png
deleted file mode 100644
index eef374a1fd63f2b1e4d72e3323e7f4c23f5705fb..0000000000000000000000000000000000000000
Binary files a/zh-cn/application-dev/quick-start/figures/02.png and /dev/null differ
diff --git a/zh-cn/application-dev/quick-start/figures/04.png b/zh-cn/application-dev/quick-start/figures/04.png
deleted file mode 100644
index 1190d1e5aa631b12171632d258e4c4fae32e9bba..0000000000000000000000000000000000000000
Binary files a/zh-cn/application-dev/quick-start/figures/04.png and /dev/null differ
diff --git a/zh-cn/application-dev/quick-start/figures/07.png b/zh-cn/application-dev/quick-start/figures/07.png
deleted file mode 100644
index 17f2b060d300667ff250935b6a37485843e854ce..0000000000000000000000000000000000000000
Binary files a/zh-cn/application-dev/quick-start/figures/07.png and /dev/null differ
diff --git a/zh-cn/application-dev/quick-start/figures/chooseFAModel_ets.png b/zh-cn/application-dev/quick-start/figures/chooseFAModel_ets.png
new file mode 100644
index 0000000000000000000000000000000000000000..784659f8b0efaf71620d06dd0df5c58d22ac47f4
Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/chooseFAModel_ets.png differ
diff --git a/zh-cn/application-dev/quick-start/figures/chooseFAModel_js.png b/zh-cn/application-dev/quick-start/figures/chooseFAModel_js.png
new file mode 100644
index 0000000000000000000000000000000000000000..4d121aa3a9a1e3ba68cc5f70f6944fcfa3cef792
Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/chooseFAModel_js.png differ
diff --git a/zh-cn/application-dev/quick-start/figures/chooseStageModel.png b/zh-cn/application-dev/quick-start/figures/chooseStageModel.png
new file mode 100644
index 0000000000000000000000000000000000000000..3125c8ba0591ce0c53344f35fb780eb956601624
Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/chooseStageModel.png differ
diff --git a/zh-cn/application-dev/quick-start/figures/createProject.png b/zh-cn/application-dev/quick-start/figures/createProject.png
new file mode 100644
index 0000000000000000000000000000000000000000..7a56a44e0e7f80671b86c521792352db625ccad7
Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/createProject.png differ
diff --git a/zh-cn/application-dev/quick-start/figures/09.png b/zh-cn/application-dev/quick-start/figures/secondPage.png
similarity index 100%
rename from zh-cn/application-dev/quick-start/figures/09.png
rename to zh-cn/application-dev/quick-start/figures/secondPage.png
diff --git a/zh-cn/application-dev/quick-start/figures/06.png b/zh-cn/application-dev/quick-start/figures/signConfig.png
similarity index 100%
rename from zh-cn/application-dev/quick-start/figures/06.png
rename to zh-cn/application-dev/quick-start/figures/signConfig.png
diff --git a/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001364054489.png b/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001364054489.png
index bcc45efdddb87a39201661c5f6d3ccbce9bfd3e6..8959cbb51a89df8142870313881bd45c2974d2ba 100644
Binary files a/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001364054489.png and b/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001364054489.png differ
diff --git a/zh-cn/application-dev/quick-start/module-structure.md b/zh-cn/application-dev/quick-start/module-structure.md
index 16534e58587ab1f6e55603e96f2ebbbcfc6ac814..d859c9c54f5fd7fe1557dba0053b361b3c90b076 100644
--- a/zh-cn/application-dev/quick-start/module-structure.md
+++ b/zh-cn/application-dev/quick-start/module-structure.md
@@ -48,7 +48,7 @@ module示例:
}
],
"orientation": "unspecified",
- "exported": true,
+ "visible": true,
"srcPath": "EntryAbility",
"name": ".EntryAbility",
"srcLanguage": "ets",
@@ -57,7 +57,7 @@ module示例:
"formsEnabled": false,
"label": "$string:MainAbility_label",
"type": "page",
- "launchType": "multiton"
+ "launchType": "standard"
}
],
"distro": {
@@ -263,8 +263,8 @@ OpenHarmony系统对无图标应用严格管控。如果HAP中没有配置入口
| icon | 标识Ability图标资源文件的索引。取值示例:$media:ability_icon。如果在该Ability的skills属性中,actions的取值包含 "action.system.home",entities取值中包含"entity.system.home",则该Ability的icon将同时作为应用的icon。如果存在多个符合条件的Ability,则取位置靠前的Ability的icon作为应用的icon。
说明:应用的"icon"和"label"是用户可感知配置项,需要区别于当前所有已有的应用"icon"或"label"(至少有一个不同)。 | 字符串 | 可缺省,缺省值为空。 |
| label | 标识Ability对用户显示的名称。取值可以是Ability名称,也可以是对该名称的资源索引,以支持多语言。如果在该Ability的skills属性中,actions的取值包含 "action.system.home",entities取值中包含"entity.system.home",则该Ability的label将同时作为应用的label。如果存在多个符合条件的Ability,则取位置靠前的Ability的label作为应用的label。
说明: 应用的"icon"和"label"是用户可感知配置项,需要区别于当前所有已有的应用"icon"或"label"(至少有一个不同)。该标签为资源文件中定义的字符串的引用,或以"{}"包括的字符串。该标签最大长度为255个字节。 | 字符串 | 可缺省,缺省值为空。 |
| uri | 标识Ability的统一资源标识符。该标签最大长度为255个字节。 | 字符串 | 可缺省,对于data类型的Ability不可缺省。 |
-| launchType | 标识Ability的启动模式,支持"multiton"和"singleton"两种模式:
multiton:表示该Ability可以有多实例。该模式适用于大多数应用场景。
singleton:表示该Ability在所有任务栈中仅可以有一个实例。例如,具有全局唯一性的呼叫来电界面即采用"singleton"模式。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为"singleton"。 |
-| exported | 标识Ability是否可以被其他应用调用。
true:可以被其他应用调用。
false:不能被其他应用调用。 | 布尔类型 | 可缺省,缺省值为"false"。 |
+| launchType | 标识Ability的启动模式,支持"standard"和"singleton"两种模式:
standard:表示该Ability可以有多实例。该模式适用于大多数应用场景。
singleton:表示该Ability在所有任务栈中仅可以有一个实例。例如,具有全局唯一性的呼叫来电界面即采用"singleton"模式。该标签仅适用于默认设备、平板、智慧屏、车机、智能穿戴。 | 字符串 | 可缺省,缺省值为"singleton"。 |
+| visible | 标识Ability是否可以被其他应用调用。
true:可以被其他应用调用。
false:不能被其他应用调用。 | 布尔类型 | 可缺省,缺省值为"false"。 |
| permissions | 标识其他应用的Ability调用此Ability时需要申请的权限集合,一个数组元素为一个权限名称。通常采用反向域名格式(最大255字节),取值为系统预定义的权限。 | 字符串数组 | 可缺省,缺省值为空。 |
|skills | 标识Ability能够接收的want的特征。 | 对象数组 | 可缺省,缺省值为空。 |
| deviceCapability | 标识Ability运行时要求设备具有的能力,采用字符串数组的格式表示。该标签为数组,支持最多配置512个元素,单个元素最大字节长度为64。 | 字符串数组 | 可缺省,缺省值为空。 |
@@ -277,7 +277,7 @@ OpenHarmony系统对无图标应用严格管控。如果HAP中没有配置入口
| writePermission | 标识向Ability写数据所需的权限。该标签仅适用于data类型的Ability。取值为长度不超过255字节的字符串。 | 字符串 | 可缺省,缺省为空。 |
| configChanges | 标识Ability关注的系统配置集合。当已关注的配置发生变更后,Ability会收到onConfigurationUpdated回调。取值范围:
mcc:表示IMSI移动设备国家/地区代码(MCC)发生变更。典型场景:检测到SIM并更新MCC。
mnc:IMSI移动设备网络代码(MNC)发生变更。典型场景:检测到SIM并更新MNC。
locale:表示语言区域发生变更。典型场景:用户已为设备文本的文本显示选择新的语言类型。
layout:表示屏幕布局发生变更。典型场景:当前有不同的显示形态都处于活跃状态。
fontSize:表示字号发生变更。典型场景:用户已设置新的全局字号。
orientation:表示屏幕方向发生变更。典型场景:用户旋转设备。
density:表示显示密度发生变更。典型场景:用户可能指定不同的显示比例,或当前有不同的显示形态同时处于活跃状态。
size:显示窗口大小发生变更。
smallestSize:显示窗口较短边的边长发生变更。
colorMode:颜色模式发生变更。 | 字符串数组 | 可缺省,缺省为空。 |
| mission | 标识Ability指定的任务栈。该标签仅适用于page类型的Ability。默认情况下应用中所有Ability同属一个任务栈。 | 字符串 | 可缺省,缺省为应用的包名。 |
-| targetAbility | 标识当前Ability重用的目标Ability。该标签仅适用于page类型的Ability。如果配置了targetAbility属性,则当前Ability(即别名Ability)的属性中仅name、icon、label、exported、permissions、skills生效,其他属性均沿用targetAbility中的属性值。目标Ability必须与别名Ability在同一应用中,且在配置文件中目标Ability必须在别名之前进行声明。 | 字符串 | 可缺省,缺省值为空。表示当前Ability不是一个别名Ability。 |
+| targetAbility | 标识当前Ability重用的目标Ability。该标签仅适用于page类型的Ability。如果配置了targetAbility属性,则当前Ability(即别名Ability)的属性中仅name、icon、label、visible、permissions、skills生效,其他属性均沿用targetAbility中的属性值。目标Ability必须与别名Ability在同一应用中,且在配置文件中目标Ability必须在别名之前进行声明。 | 字符串 | 可缺省,缺省值为空。表示当前Ability不是一个别名Ability。 |
| formsEnabled | 标识Ability是否支持卡片(forms)功能。该标签仅适用于page类型的Ability。
true:支持卡片能力。
false:不支持卡片能力。 | 布尔值 | 可缺省,缺省值为false。 |
| forms | 标识服务卡片的属性。该标签仅当formsEnabled为"true"时,才能生效。 | 对象数组 | 可缺省,缺省值为空。 |
| srcLanguage | Ability开发语言的类型,开发者创建工程时由开发者手动选择开发语言。 | 字符串 | 可缺省,缺省值为“js”。 |
@@ -308,10 +308,10 @@ abilities示例:
"icon": "$media:ic_launcher",
// $string:example 为字符串类资源
"label": "$string:example",
- "launchType": "multiton",
+ "launchType": "standard",
"orientation": "unspecified",
"permissions": [],
- "exported": true,
+ "visible": true,
"skills": [
{
"actions": [
@@ -338,9 +338,9 @@ abilities示例:
"description": "example play ability",
"icon": "$media:ic_launcher",
"label": "$string:example",
- "launchType": "multiton",
+ "launchType": "standard",
"orientation": "unspecified",
- "exported": false,
+ "visible": false,
"skills": [
{
"actions": [
@@ -361,7 +361,7 @@ abilities示例:
"name": ".UserADataAbility",
"type": "data",
"uri": "dataability://com.example.world.test.UserADataAbility",
- "exported": true
+ "visible": true
}
]
```
diff --git a/zh-cn/application-dev/quick-start/start-overview.md b/zh-cn/application-dev/quick-start/start-overview.md
index 17cfcb5a1cff589cbddf6bffb394eb122e882b3b..d3a3528883a02dbeb91d210de97606e0109455bc 100644
--- a/zh-cn/application-dev/quick-start/start-overview.md
+++ b/zh-cn/application-dev/quick-start/start-overview.md
@@ -41,6 +41,6 @@ FA模型和Stage模型的整体架构和设计思想等更多区别,请见[应
1. 安装最新版[DevEco Studio](https://developer.harmonyos.com/cn/develop/deveco-studio)。
-2. 请参考[配置OpenHarmony SDK](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ohos-setting-up-environment-0000001263160443-V3),完成**DevEco Studio**的安装和开发环境配置。
+2. 请参考[配置开发环境](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/environment_config-0000001052902427-V3),完成**DevEco Studio**的安装和开发环境配置。
完成上述操作及基本概念的理解后,可参照[使用ArkTS语言进行开发(Stage模型)](start-with-ets-stage.md)、[使用ArkTS语言开发(FA模型)](start-with-ets-fa.md)、[使用JS语言开发(FA模型)](../quick-start/start-with-js-fa.md)中的任一章节进行下一步体验和学习。
\ No newline at end of file
diff --git a/zh-cn/application-dev/quick-start/start-with-ets-fa.md b/zh-cn/application-dev/quick-start/start-with-ets-fa.md
index 00fdfdbd088ba060a8d86bcaf31ac03df3326c03..e04557d126081c36aced089576003df3e26b6002 100644
--- a/zh-cn/application-dev/quick-start/start-with-ets-fa.md
+++ b/zh-cn/application-dev/quick-start/start-with-ets-fa.md
@@ -5,28 +5,29 @@
>
> 请使用**DevEco Studio V3.0.0.601 Beta1**及更高版本。
>
-> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta1**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio)获取下载链接。
+> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta2**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio)获取下载链接。
## 创建ArkTS工程
-1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**OpenHarmony**模板库,选择模板“**Empty Ability**”,点击**Next**进行下一步配置。
+1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**Application**应用开发(本文以应用开发为例,**Atomic Service**对应为原子化服务开发),选择模板“**Empty Ability**”,点击**Next**进行下一步配置。
- 
+ 
2. 进入配置工程界面,**Compile SDK** 选择“**8**”(**Compile SDK**选择“**9**”时注意同步选择**Model** 为“**FA**”,此处以选择“**8**”为例),**Language**选择“**ArkTS**”,其他参数保持默认设置即可。
- 
+ 
> **说明:**
>
- > DevEco Studio V3.0 Beta3及更高版本支持使用ArkTS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ohos-ide-low-code-overview-0000001445605884-V3)方式。
+ > DevEco Studio V3.0 Beta3及更高版本支持使用ArkTS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ide-low-code-overview-0000001480179573-V3)方式。
>
> 低代码开发方式具有丰富的UI界面编辑功能,通过可视化界面开发方式快速构建布局,可有效降低开发者的上手成本并提升开发者构建UI界面的效率。
>
> 如需使用低代码开发方式,请打开上图中的Enable Super Visual开关。
3. 点击**Finish**,工具会自动生成示例代码和相关资源,等待工程创建完成。
+4. 工程创建完成后,在**entry > build-profile.json5**文件中,将targets中的runtimeOS改为“OpenHarmony”,然后点击右上角提示框的**Sync Now**以进行OpenHarmony应用开发。
## ArkTS工程目录结构(FA模型)
@@ -34,18 +35,16 @@

- **entry**:OpenHarmony工程模块,编译构建生成一个[HAP](../../glossary.md#hap)包。
- - **src > main > ets**:用于存放ets源码。
+ - **src > main > ets**:用于存放ArkTS源码。
- **src > main > ets > MainAbility**:应用/服务的入口。
- **src > main > ets > MainAbility > pages**:MainAbility包含的页面。
- **src > main > ets > MainAbility > pages > index.ets**:pages列表中的第一个页面,即应用的首页入口。
- **src > main > ets > MainAbility > app.ets**:承载Ability生命周期。
- **src > main > resources**:用于存放应用/服务所用到的资源文件,如图形、多媒体、字符串、布局文件等。关于资源文件,详见[资源文件的分类](resource-categories-and-access.md#资源分类)。
- **src > main > config.json**:模块配置文件。主要包含HAP的配置信息、应用/服务在具体设备上的配置信息以及应用/服务的全局配置信息。具体的配置文件说明,详见[应用配置文件(FA模型)](application-configuration-file-overview-fa.md)。
- - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。
+ - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。其中targets中可配置当前运行环境,默认为HarmonyOS。若需开发OpenHarmony应用,则需开发者自行修改为OpenHarmony。
- **hvigorfile.ts**:模块级编译构建任务脚本,开发者可以自定义相关任务和代码实现。
-
- **build-profile.json5**:应用级配置信息,包括签名、产品配置等。
-
- **hvigorfile.ts**:应用级编译构建任务脚本。
@@ -291,7 +290,7 @@
2. 点击**File** > **Project Structure...** > **Project** > **SigningConfigs** 界面勾选“**Automatically generate signature**”,等待自动签名完成即可,点击“**OK**”。如下图所示:
- 
+ 
3. 在编辑窗口右上角的工具栏,点击按钮运行。效果如下图所示:
diff --git a/zh-cn/application-dev/quick-start/start-with-ets-stage.md b/zh-cn/application-dev/quick-start/start-with-ets-stage.md
index f913187c82312cb47d3316d36cdf8e1a1998152d..309d69cc9868c8e29311564cf74c2a16c80eeb43 100644
--- a/zh-cn/application-dev/quick-start/start-with-ets-stage.md
+++ b/zh-cn/application-dev/quick-start/start-with-ets-stage.md
@@ -5,22 +5,22 @@
>
> 请使用**DevEco Studio V3.0.0.900 Beta3**及更高版本。
>
-> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta1**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio)获取下载链接。
+> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta2**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio)获取下载链接。
## 创建ArkTS工程
-1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**OpenHarmony**模板库,选择模板“**Empty Ability**”,点击**Next**进行下一步配置。
+1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**Application**应用开发(本文以应用开发为例,**Atomic Service**对应为原子化服务开发),选择模板“**Empty Ability**”,点击**Next**进行下一步配置。
- 
+ 
2. 进入配置工程界面,**Compile SDK**选择“**9**”,**Model** 选择“**Stage**”,其他参数保持默认设置即可。
- 
+ 
> **说明:**
>
- > 支持使用ArkTS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ohos-ide-low-code-overview-0000001445605884-V3)方式。
+ > 支持使用ArkTS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ide-low-code-overview-0000001480179573-V3)方式。
>
> 低代码开发方式具有丰富的UI界面编辑功能,通过可视化界面开发方式快速构建布局,可有效降低开发者的上手成本并提升开发者构建UI界面的效率。
>
@@ -28,22 +28,24 @@
3. 点击**Finish**,工具会自动生成示例代码和相关资源,等待工程创建完成。
+4. 工程创建完成后,在**entry > build-profile.json5**文件中,将targets中的runtimeOS改为“OpenHarmony”,然后点击右上角提示框的**Sync Now**以进行OpenHarmony应用开发。
+
## ArkTS工程目录结构(Stage模型)

+- **AppStore > app.json5**:应用的全局配置信息。
- **entry**:OpenHarmony工程模块,编译构建生成一个[HAP](../../glossary.md#hap)包。
- - **src > main > ets**:用于存放ets源码。
+ - **oh_modules**:用于存放三方库依赖信息。关于原npm工程适配ohpm操作,请参考[历史工程手动迁移](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/project_overview-0000001053822398-V3#section108143331212)。
+ - **src > main > ets**:用于存放ArkTS源码。
- **src > main > ets > entryability**:应用/服务的入口。
- **src > main > ets > pages**:应用/服务包含的页面。
- **src > main > resources**:用于存放应用/服务所用到的资源文件,如图形、多媒体、字符串、布局文件等。关于资源文件,详见[资源文件的分类](resource-categories-and-access.md#资源分类)。
- **src > main > module.json5**:模块配置文件。主要包含HAP的配置信息、应用/服务在具体设备上的配置信息以及应用/服务的全局配置信息。具体的配置文件说明,详见[module.json5配置文件](module-configuration-file.md)。
- - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。
- - **hvigorfile.ts**:模块级编译构建任务脚本,开发者可以自定义相关任务和代码实现。
-
+ - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。其中targets中可配置当前运行环境,默认为HarmonyOS。若需开发OpenHarmony应用,则需开发者自行修改为OpenHarmony。
+- **hvigorfile.ts**:模块级编译构建任务脚本,开发者可以自定义相关任务和代码实现。
- **build-profile.json5**:应用级配置信息,包括签名、产品配置等。
-
- **hvigorfile.ts**:应用级编译构建任务脚本。
@@ -123,7 +125,7 @@
- 新建第二个页面文件。在“**Project**”窗口,打开“**entry > src > main > ets**”,右键点击“**pages**”文件夹,选择“**New > ArkTS File**”,命名为“**Second**”,点击“**Finish**”。可以看到文件目录结构如下:
- 
+ 
> **说明:**
>
@@ -281,7 +283,7 @@
2. 点击**File** > **Project Structure...** > **Project** > **SigningConfigs**界面勾选“**Automatically generate signature**”,等待自动签名完成即可,点击“**OK**”。如下图所示:
- 
+ 
3. 在编辑窗口右上角的工具栏,点击按钮运行。效果如下图所示:
diff --git a/zh-cn/application-dev/quick-start/start-with-js-fa.md b/zh-cn/application-dev/quick-start/start-with-js-fa.md
index e1bc75285c9d17d4731418e272001dc865edb16c..027047b98c7f9f57dde812613cff25a3601a5927 100644
--- a/zh-cn/application-dev/quick-start/start-with-js-fa.md
+++ b/zh-cn/application-dev/quick-start/start-with-js-fa.md
@@ -3,22 +3,22 @@
> **说明:**
>
-> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta1**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio#download)获取下载链接。
+> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta2**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio#download)获取下载链接。
## 创建JS工程
-1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**OpenHarmony**模板库,选择模板“**Empty Ability**”,点击**Next**进行下一步配置。
+1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**Application**应用开发(本文以应用开发为例,**Atomic Service**对应为原子化服务开发),选择模板“**Empty Ability**”,点击**Next**进行下一步配置。
- 
+ 
2. 进入配置工程界面,**Compile SDK**选择“**8**”(**Compile SDK**选择“**9**”时注意同步选择 **Model** 为“**FA**”,此处以选择“**8**”为例),**Language**选择“**JS**”,其他参数保持默认设置即可。
- 
+ 
> **说明:**
>
- > DevEco Studio V2.2 Beta1及更高版本支持使用JS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ohos-ide-low-code-overview-0000001445605884-V3)方式。
+ > DevEco Studio V2.2 Beta1及更高版本支持使用JS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ide-low-code-overview-0000001480179573-V3)方式。
>
> 低代码开发方式具有丰富的UI界面编辑功能,通过可视化界面开发方式快速构建布局,可有效降低开发者的上手成本并提升开发者构建UI界面的效率。
>
@@ -26,6 +26,8 @@
3. 点击**Finish**,工具会自动生成示例代码和相关资源,等待工程创建完成。
+4. 工程创建完成后,在**entry > build-profile.json5**文件中,将targets中的runtimeOS改为“OpenHarmony”,然后点击右上角提示框的**Sync Now**以进行OpenHarmony应用开发。
+
## JS工程目录结构
@@ -40,7 +42,7 @@
- **src > main > resources**:用于存放应用/服务所用到的资源文件,如图形、多媒体、字符串、布局文件等。关于资源文件,详见[资源限定与访问](../ui/js-framework-resource-restriction.md)。
- **src > main > config.json**:模块配置文件。主要包含HAP的配置信息、应用/服务在具体设备上的配置信息以及应用/服务的全局配置信息。具体的配置文件说明,详见[应用配置文件(FA模型)](application-configuration-file-overview-fa.md)。
- - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。
+ - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。其中targets中可配置当前运行环境,默认为HarmonyOS。若需开发OpenHarmony应用,则需开发者自行修改为OpenHarmony。
- **hvigorfile.ts**:模块级编译构建任务脚本,开发者可以自定义相关任务和代码实现。
- **build-profile.json5**:应用级配置信息,包括签名、产品配置等。
@@ -226,11 +228,10 @@
2. 点击**File** > **Project Structure...** > **Project** > **Signing Configs**界面勾选“**Automatically generate signature**”,等待自动签名完成即可,点击“**OK**”。如下图所示:
- 
+ 
3. 在编辑窗口右上角的工具栏,点击按钮运行。效果如下图所示:

恭喜您已经使用JS语言开发(FA模型)完成了第一个OpenHarmony应用,快来[探索更多的OpenHarmony功能](../application-dev-guide.md)吧。
-
diff --git a/zh-cn/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md b/zh-cn/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md
index c7f5608e6f679afad5f6162c343533011d38ed6a..79eb98c313cecc829b95f67828b8d79a82743a56 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-EnterpriseAdminExtensionAbility.md
@@ -110,7 +110,7 @@ export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbil
onAppStart(bundleName: string): void
-应用卸载事件回调。
+应用启动事件回调。
**系统能力**:SystemCapability.Customization.EnterpriseDeviceManager
@@ -136,7 +136,7 @@ export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbil
onAppStop(bundleName: string): void
-应用卸载事件回调。
+应用停止事件回调。
**系统能力**:SystemCapability.Customization.EnterpriseDeviceManager
diff --git a/zh-cn/application-dev/reference/apis/js-apis-ability-featureAbility.md b/zh-cn/application-dev/reference/apis/js-apis-ability-featureAbility.md
index daed6bc605c3ae6430f947f0d973591e62d506d5..4220b7883f52d7072d0447c1c3a7f0aef11f8287 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-ability-featureAbility.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-ability-featureAbility.md
@@ -25,7 +25,7 @@ startAbility(parameter: StartAbilityParameter, callback: AsyncCallback\)
使用规则:
- 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
@@ -77,7 +77,7 @@ startAbility(parameter: StartAbilityParameter): Promise\
使用规则:
- 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
@@ -128,7 +128,7 @@ acquireDataAbilityHelper(uri: string): DataAbilityHelper
使用规则:
- 跨应用访问dataAbility,对端应用需配置关联启动
- 调用方应用位于后台时,使用该接口访问dataAbility需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标dataAbility的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标dataAbility的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
@@ -165,7 +165,7 @@ startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback\
使用规则:
- 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
@@ -218,7 +218,7 @@ startAbilityForResult(parameter: StartAbilityParameter): Promise\
使用规则:
- 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
@@ -564,7 +564,7 @@ connectAbility(request: Want, options:ConnectOptions): number
使用规则:
- 跨应用连接serviceAbility,对端应用需配置关联启动
- 调用方应用位于后台时,使用该接口连接serviceAbility需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标serviceAbility的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标serviceAbility的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
diff --git a/zh-cn/application-dev/reference/apis/js-apis-ability-particleAbility.md b/zh-cn/application-dev/reference/apis/js-apis-ability-particleAbility.md
index 18e1da6b38a7925c334934fe2e43bf1b87b2e00a..ef0d0134d8a7f645ddd16d166a5086c0598a33e4 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-ability-particleAbility.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-ability-particleAbility.md
@@ -25,7 +25,7 @@ startAbility(parameter: StartAbilityParameter, callback: AsyncCallback\):
使用规则:
- 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
@@ -75,7 +75,7 @@ startAbility(parameter: StartAbilityParameter): Promise\;
使用规则:
- 调用方应用位于后台时,使用该接口启动Ability需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标Ability的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
@@ -182,7 +182,7 @@ acquireDataAbilityHelper(uri: string): DataAbilityHelper
使用规则:
- 跨应用访问dataAbility,对端应用需配置关联启动
- 调用方应用位于后台时,使用该接口访问dataAbility需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标dataAbility的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标dataAbility的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
@@ -405,7 +405,7 @@ connectAbility(request: Want, options:ConnectOptions): number
使用规则:
- 跨应用连接serviceAbility,对端应用需配置关联启动
- 调用方应用位于后台时,使用该接口连接serviceAbility需申请`ohos.permission.START_ABILITIES_FROM_BACKGROUND`权限
- - 跨应用场景下,目标serviceAbility的exported属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
+ - 跨应用场景下,目标serviceAbility的visible属性若配置为false,调用方应用需申请`ohos.permission.START_INVISIBLE_ABILITY`权限
- 组件启动规则详见:[组件启动规则(FA模型)](../../application-models/component-startup-rules-fa.md)
**系统能力**:SystemCapability.Ability.AbilityRuntime.FAModel
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-errorManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-errorManager.md
index 3ffc94c818de97cc9b2c1e515f89ecd0265f239f..640b08d8cd0ffe1a259e663a9df514bdc175a61b 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-errorManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-errorManager.md
@@ -32,6 +32,14 @@ on(type: 'error', observer: ErrorObserver): number;
| -------- | -------- |
| number | 观察器的index值,和观察器一一对应。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16000003 | Id does not exist. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -71,6 +79,14 @@ off(type: 'error', observerId: number, callback: AsyncCallback\): void;
| observerId | number | 是 | 由on方法返回的观察器的index值。 |
| callback | AsyncCallback\ | 是 | 表示指定的回调方法。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16000003 | Id does not exist. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -109,6 +125,14 @@ off(type: 'error', observerId: number): Promise\;
| -------- | -------- |
| Promise\ | 返回执行结果。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16000003 | Id does not exist. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-missionManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-missionManager.md
index 566ae59852950a9c918485661e57fee21474faae..4f41fa7a307f7584da825acbf4c8232799d837ce 100755
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-missionManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-missionManager.md
@@ -122,6 +122,14 @@ off(type: 'mission', listenerId: number, callback: AsyncCallback<void>): v
| listenerId | number | 是 | 系统任务状态监器法的index值,和监听器一一对应,由on方法返回。 |
| callback | AsyncCallback<void> | 是 | 执行结果回调函数。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16300002 | Input error. The specified mission listener does not exist. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -209,6 +217,14 @@ off(type: 'mission', listenerId: number): Promise<void>;
| -------- | -------- |
| Promise<void> | promise方式返回执行结果。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16300002 | Input error. The specified mission listener does not exist. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -624,6 +640,14 @@ lockMission(missionId: number, callback: AsyncCallback<void>): void;
| missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback<void> | 是 | 执行结果回调函数。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16300001 | Mission not found. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -667,6 +691,14 @@ lockMission(missionId: number): Promise<void>;
| -------- | -------- |
| Promise<void> | promise方式返回执行结果。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16300001 | Mission not found. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
import missionManager from '@ohos.app.ability.missionManager';
@@ -702,6 +734,14 @@ unlockMission(missionId: number, callback: AsyncCallback<void>): void;
| missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback<void> | 是 | 执行结果回调函数。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16300001 | Mission not found. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
import missionManager from '@ohos.app.ability.missionManager';
@@ -744,6 +784,14 @@ unlockMission(missionId: number): Promise<void>;
| -------- | -------- |
| Promise<void> | promise方式返回执行结果。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16300001 | Mission not found. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -924,6 +972,14 @@ moveMissionToFront(missionId: number, callback: AsyncCallback<void>): void
| missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback<void> | 是 | 执行结果回调函数。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16000009 | An ability cannot be started or stopped in Wukong mode. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -963,6 +1019,14 @@ moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCall
| options | [StartOptions](js-apis-app-ability-startOptions.md) | 是 | 启动参数选项,用于指定任务切到前台时的窗口模式,设备ID等。 |
| callback | AsyncCallback<void> | 是 | 执行结果回调函数。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16000009 | An ability cannot be started or stopped in Wukong mode. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -1007,6 +1071,14 @@ moveMissionToFront(missionId: number, options?: StartOptions): Promise<void&g
| -------- | -------- |
| Promise<void> | promise方式返回执行结果。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 16000009 | An ability cannot be started or stopped in Wukong mode. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
index b9ae553c8814f479412f04c6e016492306396727..0b908a0bd49caa2dcd9020a731818e17fa7af889 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-quickFixManager.md
@@ -62,6 +62,25 @@ applyQuickFix(hapModuleQuickFixFiles: Array\, callback: AsyncCallback\ | 是 | 快速修复补丁文件(补丁文件需包含有效的文件路径)。 |
| callback | AsyncCallback\ | 是 | 表示指定的回调方法。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 18500002 | Copy file failed, maybe not exist or inaccessible. |
+| 18500008 | Internal error. |
+
+在打补丁过程中发生的错误,其错误码及错误信息通过公共事件[COMMON_EVENT_QUICK_FIX_APPLY_RESULT](commonEvent-definitions.md#common_event_quick_fix_apply_result9)的参数返回给应用开发者。这部分错误码及错误信息如下:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 18500003 | Deploy hqf failed. |
+| 18500004 | Switch hqf failed. |
+| 18500005 | Delete hqf failed. |
+| 18500006 | Load patch failed. |
+| 18500007 | Unload patch failed. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
> 说明:调用applyQuickFix接口时,补丁文件所在路径为应用沙箱路径。沙箱路径的获取参考[获取应用的沙箱路径](js-apis-bundle-BundleInstaller.md#获取应用的沙箱路径),映射到设备上的路径为/proc/<应用进程Id>/root/沙箱路径。
**示例:**
@@ -105,6 +124,25 @@ applyQuickFix(hapModuleQuickFixFiles: Array\): Promise\;
| -------- | -------- |
| Promise\ | 返回相应结果。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 18500002 | Copy file failed, maybe not exist or inaccessible. |
+| 18500008 | Internal error. |
+
+在打补丁过程中发生的错误,其错误码及错误信息通过公共事件[COMMON_EVENT_QUICK_FIX_APPLY_RESULT](commonEvent-definitions.md#common_event_quick_fix_apply_result9)的参数返回给应用开发者。这部分错误码及错误信息如下:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 18500003 | Deploy hqf failed. |
+| 18500004 | Switch hqf failed. |
+| 18500005 | Delete hqf failed. |
+| 18500006 | Load patch failed. |
+| 18500007 | Unload patch failed. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -139,6 +177,15 @@ getApplicationQuickFixInfo(bundleName: string, callback: AsyncCallback\ | 是 | 应用的快速修复信息。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 18500001 | The bundle is not exist. |
+| 18500008 | Internal error. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -180,6 +227,15 @@ getApplicationQuickFixInfo(bundleName: string): Promise\ | 返回应用的快速修复信息。 |
+**错误码**:
+
+| 错误码ID | 错误信息 |
+| ------- | -------- |
+| 18500001 | The bundle is not exist. |
+| 18500008 | Internal error. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md
index 2301738bc5f83b30c6139ed963e20eac4c260930..da52ea4a49fc2b6c10123538a887f08ee4310357 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md
@@ -358,7 +358,9 @@ call(method: string, data: rpc.Parcelable): Promise<void>;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 401 | If the input parameter is not valid parameter. |
+| 16200001 | Caller released. The caller has been released. |
+| 16200002 | Callee invalid. The callee does not exist. |
+| 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -437,7 +439,9 @@ callWithResult(method: string, data: rpc.Parcelable): Promise<rpc.MessageSequ
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 401 | If the input parameter is not valid parameter. |
+| 16200001 | Caller released. The caller has been released. |
+| 16200002 | Callee invalid. The callee does not exist. |
+| 16000050 | Internal Error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -505,10 +509,10 @@ release(): void;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 401 | Invalid input parameter. |
| 16200001 | Caller released. The caller has been released. |
| 16200002 | Callee invalid. The callee does not exist. |
-| 16000050 | Internal Error. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
**示例:**
@@ -542,6 +546,14 @@ release(): void;
**系统能力**:SystemCapability.Ability.AbilityRuntime.AbilityCore
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| ------- | -------------------------------- |
+| 16200001 | Caller released. The caller has been released. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
@@ -588,6 +600,14 @@ release(): void;
| -------- | -------- | -------- | -------- |
| callback | [OnRemoteStateChangeCallback](#onremotestatechangecallback) | 是 | 返回onRemoteStateChange回调结果。 |
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| ------- | -------------------------------- |
+| 16200001 | Caller released. The caller has been released. |
+
+以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
+
**示例:**
```ts
@@ -636,7 +656,7 @@ release(): void;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 401 | If the input parameter is not valid parameter. |
+| 16200001 | Caller released. The caller has been released. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -681,13 +701,6 @@ off(type: 'release', callback: OnReleaseCallback): void;
| type | string | 是 | 监听releaseCall事件,固定为'release'。 |
| callback | [OnReleaseCallback](#onreleasecallback) | 是 | 返回off回调结果。 |
-**错误码:**
-
-| 错误码ID | 错误信息 |
-| ------- | -------------------------------- |
-| 401 | If the input parameter is not valid parameter. |
-其他ID见[元能力子系统错误码](../errorcodes/errorcode-ability.md)
-
**示例:**
```ts
@@ -730,13 +743,6 @@ off(type: 'release'): void;
| -------- | -------- | -------- | -------- |
| type | string | 是 | 监听releaseCall事件,固定为'release'。 |
-**错误码:**
-
-| 错误码ID | 错误信息 |
-| ------- | -------------------------------- |
-| 401 | If the input parameter is not valid parameter. |
-其他ID见[元能力子系统错误码](../errorcodes/errorcode-ability.md)
-
**示例:**
```ts
@@ -788,7 +794,8 @@ on(method: string, callback: CalleeCallback): void;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 401 | If the input parameter is not valid parameter. |
+| 16200004 | Method registered. The method has registered. |
+| 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
@@ -853,7 +860,8 @@ off(method: string): void;
| 错误码ID | 错误信息 |
| ------- | -------------------------------- |
-| 401 | If the input parameter is not valid parameter. |
+| 16200005 | Method not registered. The method has not registered. |
+| 16000050 | Internal error. |
以上错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)。
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md
index 540592747ed6c478f156cfb3fe9aea85e2bebb6b..be50fee49f3337029f03f67e39383cfc4a49366b 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md
@@ -28,31 +28,13 @@ getWantAgent(info: WantAgentInfo, callback: AsyncCallback\): void
| callback | AsyncCallback\ | 是 | 创建WantAgent的回调方法。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -125,31 +107,13 @@ getWantAgent(info: WantAgentInfo): Promise\
| Promise\ | 以Promise形式返回WantAgent。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -211,31 +175,13 @@ getBundleName(agent: WantAgent, callback: AsyncCallback\): void
| callback | AsyncCallback\ | 是 | 获取WantAgent实例的包名的回调方法。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -321,31 +267,13 @@ getBundleName(agent: WantAgent): Promise\
| Promise\ | 以Promise形式返回获取WantAgent实例的包名。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -422,31 +350,13 @@ getUid(agent: WantAgent, callback: AsyncCallback\): void
| callback | AsyncCallback\ | 是 | 获取WantAgent实例的用户ID的回调方法。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -533,31 +443,13 @@ getUid(agent: WantAgent): Promise\
| Promise\ | 以Promise形式返回获取WantAgent实例的用户ID。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -635,31 +527,14 @@ getWant(agent: WantAgent, callback: AsyncCallback\): void
| callback | AsyncCallback\<[Want](js-apis-app-ability-want.md)\> | 是 | 获取WantAgent对象want的回调方法。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
+| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -747,31 +622,14 @@ getWant(agent: WantAgent): Promise\
| Promise\ | 以Promise形式返回获取WantAgent对象的want。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
+| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -848,31 +706,13 @@ cancel(agent: WantAgent, callback: AsyncCallback\): void
| callback | AsyncCallback\ | 是 | 取消WantAgent实例的回调方法。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -958,31 +798,13 @@ cancel(agent: WantAgent): Promise\
| Promise\ | 以Promise形式获取异步返回结果。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -1057,33 +879,6 @@ trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback\ | 否 | 主动激发WantAgent实例的回调方法。 |
-**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
-| 错误码ID | 错误信息 |
-|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
-| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
-
**示例:**
```ts
@@ -1167,33 +962,6 @@ equal(agent: WantAgent, otherAgent: WantAgent, callback: AsyncCallback\ | 是 | 判断两个WantAgent实例是否相等的回调方法。 |
-**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
-| 错误码ID | 错误信息 |
-|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
-| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
-
**示例:**
```ts
@@ -1280,33 +1048,6 @@ equal(agent: WantAgent, otherAgent: WantAgent): Promise\
| ----------------------------------------------------------- | ------------------------------------------------------------ |
| Promise\ | 以Promise形式返回获取判断两个WantAgent实例是否相等的结果。 |
-**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
-| 错误码ID | 错误信息 |
-|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
-| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
-| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
-
**示例:**
```ts
@@ -1382,31 +1123,14 @@ getOperationType(agent: WantAgent, callback: AsyncCallback\): void;
| callback | AsyncCallback\ | 是 | 获取一个WantAgent的OperationType信息的回调方法。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
+| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
@@ -1490,31 +1214,14 @@ getOperationType(agent: WantAgent): Promise\;
| Promise\ | 以Promise形式返回获取operationType的结果。 |
**错误码:**
-错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
+
| 错误码ID | 错误信息 |
|-----------|--------------------|
-| 16000001 | Input error. The specified ability name does not exist. |
-| 16000002 | Ability type error. The specified ability type is wrong.|
-| 16000003 | Input error. The specified id does not exist.|
-| 16000004 | Visibility verification failed.|
-| 16000006 | Can not cross user operations.|
| 16000007 | Service busyness. There are concurrent tasks, waiting for retry.|
-| 16000008 | Crowdtest App Expiration.|
-| 16000009 | Can not start ability in wukong mode.|
-| 16000010 | Can not operation with continue flag.|
-| 16000011 | Context does not exist.|
-| 16000050 | Internal Error.|
-| 16000051 | Network error. The network is abnormal.|
-| 16000052 | Free install not support. The applicaiotn dose not support free install.|
-| 16000053 | Not top ability. The application is not top ability.|
-| 16000054 | Free install busyness. There are concurrent tasks, waiting for retry.|
-| 16000055 | Free install timeout.|
-| 16000056 | Can not free install other ability.|
-| 16000057 | Not support cross device free install.|
-| 16000101 | execute shell command failed.|
+| 16000015 | Service timeout.|
| 16000151 | Invalid wantagent object.|
-| 16000152 | wantAgent object not found.|
-| 16000153 | wangAgent object canceled.|
+
+错误码详细介绍请参考[errcode-ability](../errorcodes/errorcode-ability.md)
**示例:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantConstant.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantConstant.md
index 67da9ed4ddafd4f68b1adc2f2c0a8d1d3d2d162b..6ae0d2a5caa5faacd943fe578668e5ad2e3f6d90 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantConstant.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantConstant.md
@@ -23,6 +23,7 @@ want的Params操作的常量。
| DLP_PARAMS_MODULE_NAME | ohos.dlp.params.moduleName | 指示DLP模块名称的参数的操作。
**系统API**:该接口为系统接口,三方应用不支持调用。 |
| DLP_PARAMS_ABILITY_NAME | ohos.dlp.params.abilityName | 指示DLP能力名称的参数的操作。
**系统API**:该接口为系统接口,三方应用不支持调用。 |
| DLP_PARAMS_INDEX | ohos.dlp.params.index | 指示DLP索引参数的操作。
**系统API**:该接口为系统接口,三方应用不支持调用。 |
+| ABILITY_RECOVERY_RESTART | ohos.ability.params.abilityRecoveryRestart | 指示当前Ability是否发生了故障恢复重启。 |
| CONTENT_TITLE_KEY | ohos.extra.param.key.contentTitle | 指示原子化服务支持分享标题的参数的操作。
**系统API**:该接口为系统接口,三方应用不支持调用。 |
| SHARE_ABSTRACT_KEY | ohos.extra.param.key.shareAbstract | 指示原子化服务支持分享内容的参数的操作。
**系统API**:该接口为系统接口,三方应用不支持调用。 |
| SHARE_URL_KEY | ohos.extra.param.key.shareUrl | 指示原子化服务支持分享链接的参数的操作。
**系统API**:该接口为系统接口,三方应用不支持调用。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md b/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md
index d12a34d5b0e790448ffff671b0ab2203b5e8939c..d584a3236072e8cc952a8a709774c997ee77dff3 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-form-formHost.md
@@ -34,7 +34,14 @@ deleteForm(formId: string, callback: AsyncCallback<void>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 202 | The application is not a system application. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -83,7 +90,14 @@ deleteForm(formId: string): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**参数:**
@@ -124,7 +138,14 @@ releaseForm(formId: string, callback: AsyncCallback<void>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -166,7 +187,14 @@ releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback<
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -213,7 +241,14 @@ releaseForm(formId: string, isReleaseCache?: boolean): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -254,7 +289,14 @@ requestForm(formId: string, callback: AsyncCallback<void>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -300,7 +342,14 @@ requestForm(formId: string): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -342,7 +391,14 @@ castToNormalForm(formId: string, callback: AsyncCallback<void>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501002 | The number of forms exceeds upper bound. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -388,7 +444,14 @@ castToNormalForm(formId: string): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501002 | The number of forms exceeds upper bound. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -429,7 +492,12 @@ notifyVisibleForms(formIds: Array<string>, callback: AsyncCallback<void
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -475,7 +543,12 @@ notifyVisibleForms(formIds: Array<string>): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -516,7 +589,12 @@ notifyInvisibleForms(formIds: Array<string>, callback: AsyncCallback<vo
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -562,7 +640,12 @@ notifyInvisibleForms(formIds: Array<string>): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -603,7 +686,13 @@ enableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void&
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -649,7 +738,13 @@ enableFormsUpdate(formIds: Array<string>): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -690,7 +785,14 @@ disableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -736,7 +838,14 @@ disableFormsUpdate(formIds: Array<string>): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -770,6 +879,14 @@ isSystemReady(callback: AsyncCallback<void>): void
| ------ | ------ | ---- | ------- |
| callback | AsyncCallback<void> | 是 | 回调函数。当检查系统是否准备好成功,error为undefined,否则为错误对象。 |
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**示例:**
```ts
@@ -800,6 +917,13 @@ isSystemReady(): Promise<void>
| -------- | -------- |
| Promise<void> | 无返回结果的Promise对象。 |
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 202 | The application is not a system application. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**示例:**
```ts
@@ -826,6 +950,18 @@ getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>):
**系统能力**:SystemCapability.Ability.Form
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
@@ -860,6 +996,17 @@ getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>
**系统能力**:SystemCapability.Ability.Form
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**返回值:**
| 类型 | 说明 |
@@ -903,7 +1050,13 @@ getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.Fo
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -946,7 +1099,13 @@ getFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback<
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -994,7 +1153,13 @@ getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formI
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1030,6 +1195,18 @@ deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<numb
| formIds | Array<string> | 是 | 有效卡片标识列表。 |
| callback | AsyncCallback<number> | 是 | 回调函数。当根据列表删除应用程序的无效卡片成功,error为undefined,data为删除的卡片个数;否则为错误对象。 |
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**示例:**
```ts
@@ -1071,6 +1248,18 @@ deleteInvalidForms(formIds: Array<string>): Promise<number>
| :------------ | :---------------------------------- |
| Promise<number> | Promise对象,返回删除的卡片个数。 |
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**示例:**
```ts
@@ -1109,7 +1298,13 @@ acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo&g
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1166,7 +1361,13 @@ acquireFormState(want: Want): Promise<formInfo.FormStateInfo>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1210,6 +1411,14 @@ on(type: 'formUninstall', callback: Callback<string>): void
| type | string | 是 | 填写'formUninstall',表示卡片卸载事件。 |
| callback | Callback<string> | 是 | 回调函数。返回卡片标识。 |
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**示例:**
```ts
@@ -1236,6 +1445,14 @@ off(type: 'formUninstall', callback?: Callback<string>): void
| type | string | 是 | 填写'formUninstall',表示卡片卸载事件。 |
| callback | Callback<string> | 否 | 回调函数。返回卡片标识。缺省时,表示注销所有已注册事件回调。
需与对应on('formUninstall')的callback一致。|
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**示例:**
```ts
@@ -1269,7 +1486,13 @@ notifyFormsVisible(formIds: Array<string>, isVisible: boolean, callback: A
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1316,7 +1539,13 @@ notifyFormsVisible(formIds: Array<string>, isVisible: boolean): Promise<
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1358,7 +1587,13 @@ notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean, c
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1405,7 +1640,13 @@ notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean):
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1446,7 +1687,13 @@ shareForm(formId: string, deviceId: string, callback: AsyncCallback<void>)
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1494,7 +1741,13 @@ shareForm(formId: string, deviceId: string): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -1535,9 +1788,14 @@ notifyFormsPrivacyProtected(formIds: Array\, isProtected: boolean, callb
**错误码:**
-| 错误码ID | 错误信息 |
-| ------------------------------------------------------------ | ------------------ |
-| 401 | 调用接口入参错误。 |
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
| 以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。 | |
**示例:**
@@ -1582,9 +1840,14 @@ function notifyFormsPrivacyProtected(formIds: Array\, isProtected: bool
**错误码:**
-| 错误码ID | 错误信息 |
-| ------------------------------------------------------------ | ------------------ |
-| 401 | 调用接口入参错误。 |
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 201 | Permissions denied. |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16501000 | An internal functional error occurred. |
| 以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。 | |
```ts
diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md b/zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md
index 5e1b17549769c8d6155a9432129cc6c1becadc55..fb8f7c9550781443922636e90feea08de80caf72 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-app-form-formProvider.md
@@ -31,7 +31,14 @@ setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback&l
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501002 | The number of forms exceeds upper bound. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -78,7 +85,14 @@ setFormNextRefreshTime(formId: string, minute: number): Promise<void>
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501002 | The number of forms exceeds upper bound. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -118,7 +132,13 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData,call
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -167,7 +187,13 @@ updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Pr
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500060 | A service connection error happened, please try again later. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
+| 16501001 | The ID of the form to be operated does not exist. |
+| 16501003 | The form can not be operated by the current application. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -204,10 +230,12 @@ getFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): voi
| callback | AsyncCallback<Array<[formInfo.FormInfo](js-apis-app-form-formInfo.md)>> | 是 | 回调函数。返回查询到的卡片信息。 |
**错误码:**
-
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
@@ -247,7 +275,10 @@ getFormsInfo(filter: formInfo.FormInfoFilter, callback: AsyncCallback<Array&l
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -297,7 +328,10 @@ getFormsInfo(filter?: formInfo.FormInfoFilter): Promise<Array<formInfo.For
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -343,7 +377,11 @@ requestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData,
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -395,7 +433,11 @@ requestPublishForm(want: Want, callback: AsyncCallback<string>): void
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -451,7 +493,11 @@ requestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData
| 错误码ID | 错误信息 |
| -------- | -------- |
-| 401 | 调用接口入参错误。 |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16500100 | Failed to obtain the configuration information. |
+| 16501000 | An internal functional error occurred. |
|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
**示例:**
@@ -494,6 +540,16 @@ isRequestPublishFormSupported(callback: AsyncCallback<boolean>): void
| ------ | ------ | ---- | ------- |
| callback | AsyncCallback<boolean> | 是 | 回调函数。返回是否支持发布一张卡片到使用方。|
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 202 | The application is not a system application. |
+| 401 | If the input parameter is not valid parameter. |
+| 16500050 | An IPC connection error happened. |
+| 16501000 | An internal functional error occurred. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**示例:**
```ts
@@ -548,6 +604,15 @@ isRequestPublishFormSupported(): Promise<boolean>
| :------------ | :---------------------------------- |
| Promise<boolean> | Promise对象。返回是否支持发布一张卡片到使用方。 |
+**错误码:**
+
+| 错误码ID | 错误信息 |
+| -------- | -------- |
+| 202 | The application is not a system application. |
+| 16500050 | An IPC connection error happened. |
+| 16501000 | An internal functional error occurred. |
+|以上错误码的详细介绍请参见[卡片错误码](../errorcodes/errorcode-form.md)。||
+
**示例:**
```ts
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundle-ApplicationInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundle-ApplicationInfo.md
index c1e20856bc517f82791a6e365645d88015b9d1d3..5410dd74cd29becf202eb439a888ea9df22a4885 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundle-ApplicationInfo.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundle-ApplicationInfo.md
@@ -26,11 +26,11 @@
| iconId | string | 是 | 否 | 应用程序图标的资源id值。 |
| process | string | 是 | 否 | 应用程序的进程,如果不设置,默认为包的名称。 |
| supportedModes | number | 是 | 否 | 标识应用支持的运行模式,当前只定义了驾驶模式(drive)。该标签只适用于车机。 |
-| moduleSourceDirs | Array\ | 是 | 否 | 应用程序的资源存放的相对路径。 |
+| moduleSourceDirs | Array\ | 是 | 否 | 应用程序的资源存放的相对路径。不能拼接路径访问资源文件,请使用[资源管理接口](js-apis-resource-manager.md)访问资源。 |
| permissions | Array\ | 是 | 否 | 访问应用程序所需的权限。
通过调用[bundle.getApplicationInfo](js-apis-Bundle.md#bundlegetapplicationinfodeprecated)接口时,传入GET_APPLICATION_INFO_WITH_PERMISSION获取。 |
| moduleInfos | Array\<[ModuleInfo](js-apis-bundle-ModuleInfo.md)> | 是 | 否 | 应用程序的模块信息。 |
-| entryDir | string | 是 | 否 | 应用程序的文件保存路径。 |
-| codePath8+ | string | 是 | 否 | 应用程序的安装目录。 |
+| entryDir | string | 是 | 否 | 应用程序的文件保存路径。不能拼接路径访问资源文件,请使用[资源管理接口](js-apis-resource-manager.md)访问资源。 |
+| codePath8+ | string | 是 | 否 | 应用程序的安装目录。不能拼接路径访问资源文件,请使用[资源管理接口](js-apis-resource-manager.md)访问资源。 |
| metaData8+ | Map\> | 是 | 否 | 应用程序的自定义元信息。
通过调用[bundle.getApplicationInfo](js-apis-Bundle.md#bundlegetapplicationinfodeprecated)接口时,传入GET_APPLICATION_INFO_WITH_METADATA获取。 |
| removable8+ | boolean | 是 | 否 | 应用程序是否可以被移除。 |
| accessTokenId8+ | number | 是 | 否 | 应用程序的accessTokenId。 |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundle-ModuleInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundle-ModuleInfo.md
index a3221812add7f5461b29281968e1fd24ae7c3c76..8cfbeddf13b70ba4de142d77d7c0d6289ea22aa4 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-bundle-ModuleInfo.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-bundle-ModuleInfo.md
@@ -12,4 +12,4 @@
| 名称 | 类型 | 可读 | 可写 | 说明 |
| --------------- | ------ | ---- | ---- | -------- |
| moduleName | string | 是 | 否 | 模块名称。 |
-| moduleSourceDir | string | 是 | 否 | 安装目录。 |
\ No newline at end of file
+| moduleSourceDir | string | 是 | 否 | 安装目录。不能拼接路径访问资源文件,请使用[资源管理接口](js-apis-resource-manager.md)访问资源。 |
\ No newline at end of file
diff --git a/zh-cn/application-dev/reference/apis/js-apis-commonEventManager.md b/zh-cn/application-dev/reference/apis/js-apis-commonEventManager.md
index 71359cac05b2716a4ed36012a18c4734cdc4e60b..8ed865ef1cf2b5265c43037b8ef1a125d92ce2ea 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-commonEventManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-commonEventManager.md
@@ -37,6 +37,14 @@ publish(event: string, callback: AsyncCallback): void
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 401 | The parameter check failed. |
+| 1500004 | not System services. |
+| 1500007 | error sending message to Common Event Service. |
+| 1500008 | Common Event Service does not complete initialization. |
+| 1500009 | error obtaining system parameters. |
+
**示例:**
```ts
@@ -77,6 +85,14 @@ publish(event: string, options: CommonEventPublishData, callback: AsyncCallback<
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 401 | The parameter check failed. |
+| 1500004 | not System services. |
+| 1500007 | error sending message to Common Event Service. |
+| 1500008 | Common Event Service does not complete initialization. |
+| 1500009 | error obtaining system parameters. |
+
**示例:**
```ts
@@ -126,6 +142,15 @@ publishAsUser(event: string, userId: number, callback: AsyncCallback): voi
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 202 | not system app. |
+| 401 | The parameter check failed. |
+| 1500004 | not System services. |
+| 1500007 | error sending message to Common Event Service. |
+| 1500008 | Common Event Service does not complete initialization. |
+| 1500009 | error obtaining system parameters. |
+
**示例:**
```ts
@@ -172,6 +197,15 @@ publishAsUser(event: string, userId: number, options: CommonEventPublishData, ca
错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 202 | not system app. |
+| 401 | The parameter check failed. |
+| 1500004 | not System services. |
+| 1500007 | error sending message to Common Event Service. |
+| 1500008 | Common Event Service does not complete initialization. |
+| 1500009 | error obtaining system parameters. |
+
**示例:**
@@ -217,6 +251,14 @@ createSubscriber(subscribeInfo: CommonEventSubscribeInfo, callback: AsyncCallbac
| subscribeInfo | [CommonEventSubscribeInfo](./js-apis-inner-commonEvent-commonEventSubscribeInfo.md) | 是 | 表示订阅信息。 |
| callback | AsyncCallback\<[CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md)> | 是 | 表示创建订阅者的回调方法。 |
+**错误码:**
+
+错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 401 | The parameter check failed. |
+
**示例:**
@@ -265,6 +307,14 @@ createSubscriber(subscribeInfo: CommonEventSubscribeInfo): Promise | 返回订阅者对象。 |
+**错误码:**
+
+错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 401 | The parameter check failed. |
+
**示例:**
```ts
@@ -300,6 +350,17 @@ subscribe(subscriber: CommonEventSubscriber, callback: AsyncCallback | 是 | 表示接收公共事件数据的回调函数。 |
+**错误码:**
+
+错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 401 | The parameter check failed. |
+| 801 | capability not supported. |
+| 1500007 | error sending message to Common Event Service. |
+| 1500008 | Common Event Service does not complete initialization. |
+
**示例:**
```ts
@@ -359,6 +420,17 @@ unsubscribe(subscriber: CommonEventSubscriber, callback?: AsyncCallback):
| subscriber | [CommonEventSubscriber](./js-apis-inner-commonEvent-commonEventSubscriber.md) | 是 | 表示订阅者对象。 |
| callback | AsyncCallback\ | 否 | 表示取消订阅的回调方法。 |
+**错误码:**
+
+错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 401 | The parameter check failed. |
+| 801 | capability not supported. |
+| 1500007 | error sending message to Common Event Service. |
+| 1500008 | Common Event Service does not complete initialization. |
+
**示例:**
```ts
@@ -430,6 +502,19 @@ removeStickyCommonEvent(event: string, callback: AsyncCallback): void
| event | string | 是 | 表示被移除的粘性公共事件。 |
| callback | AsyncCallback\ | 是 | 表示移除粘性公共事件的回调方法。 |
+**错误码:**
+
+错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 201 | The application dose not have permission to call the interface. |
+| 202 | not system app. |
+| 401 | The parameter check failed. |
+| 1500004 | not system service. |
+| 1500007 | The message send error. |
+| 1500008 | The CEMS error. |
+
**示例:**
@@ -466,6 +551,19 @@ removeStickyCommonEvent(event: string): Promise
| -------------- | ---------------------------- |
| Promise\ | 表示移除粘性公共事件的对象。 |
+**错误码:**
+
+错误码介绍请参考[@ohos.commonEventManager(事件)](../errorcodes/errorcode-CommonEventService.md)
+
+| 错误码ID | 错误信息 |
+| -------- | ----------------------------------- |
+| 201 | The application dose not have permission to call the interface. |
+| 202 | not system app. |
+| 401 | The parameter check failed. |
+| 1500004 | not system service. |
+| 1500007 | The message send error. |
+| 1500008 | The CEMS error. |
+
**示例:**
diff --git a/zh-cn/application-dev/reference/apis/js-apis-enterprise-accountManager.md b/zh-cn/application-dev/reference/apis/js-apis-enterprise-accountManager.md
index bee6cc69d5bcacfdbbea479f2f56958c283e4193..ae6c7f9e45e34b18e8c502982bd51e78d72ea9d8 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-enterprise-accountManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-enterprise-accountManager.md
@@ -16,7 +16,7 @@ import accountManager from '@ohos.enterprise.accountManager';
disallowAddLocalAccount(admin: Want, disallow: boolean, callback: AsyncCallback<void>): void
-是否禁止创建本地用户接口,使用callback异步回调。
+指定设备管理员应用禁止创建本地用户接口,使用callback形式返回设置结果。
**需要权限:** ohos.permission.ENTERPRISE_SET_ACCOUNT_POLICY
@@ -28,9 +28,9 @@ disallowAddLocalAccount(admin: Want, disallow: boolean, callback: AsyncCallback&
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ------------------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
-| disallow | boolean | 是 | 是否禁止创建本地用户,true表示禁止,false表示解除禁止。 |
-| callback | AsyncCallback<void> | 是 | 回调函数。当接口调用成功err为null,否则为错误对象。 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
+| disallow | boolean | 是 | 是否禁止创建本地用户,true表示禁止创建本地用户,false表示允许创建本地用户。 |
+| callback | AsyncCallback<void> | 是 | 回调函数。当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -59,7 +59,7 @@ accountManager.disallowAddLocalAccount(admin, true, (error) => {
disallowAddLocalAccount(admin: Want, disallow: boolean): Promise<void>
-是否禁止创建本地用户,使用promise异步回调。
+指定设备管理员应用禁止创建本地用户,使用Promise形式返回设置结果。
**需要权限:** ohos.permission.ENTERPRISE_SET_ACCOUNT_POLICY
@@ -71,14 +71,14 @@ disallowAddLocalAccount(admin: Want, disallow: boolean): Promise<void>
| 参数名 | 类型 | 必填 | 说明 |
| ----- | ----------------------------------- | ---- | ------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
-| disallow | boolean | 是 | 是否禁止创建本地用户,true表示禁止,false表示解除禁止。 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
+| disallow | boolean | 是 | 是否禁止创建本地用户,true表示禁止创建本地用户,false表示允许创建本地用户。 |
**返回值:**
| 类型 | 说明 |
| --------------------- | ------------------------- |
-| Promise<void> | 无返回结果的Promise对象。 |
+| Promise<void> | 无返回结果的Promise对象。当禁止创建本地用户失败时抛出错误对象。 |
**错误码**:
diff --git a/zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md b/zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md
index b590eaabcd37d55076372d91e1827ca98e9e79ea..a2a47106d0b1a5f329b7e9ed58d24b152a2b89d5 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-enterprise-adminManager.md
@@ -16,7 +16,7 @@ import adminManager from '@ohos.enterprise.adminManager';
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback\): void
-以异步方法根据给定的包名和类名激活设备管理员应用,使用Callback形式返回是否激活成功。
+激活当前用户下的指定设备管理员应用,使用callback形式返回是否激活成功。其中超级管理员应用只能在管理员用户下被激活。
**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
@@ -28,10 +28,10 @@ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callba
| 参数名 | 类型 | 必填 | 说明 |
| -------------- | ----------------------------------- | ---- | ------------------ |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
-| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | 是 | 设备管理员应用的企业信息 |
-| type | [AdminType](#admintype) | 是 | 激活的设备管理员类型 |
-| callback | AsyncCallback\ | 是 | callback方式返回是否激活成功 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
+| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | 是 | 设备管理员应用的企业信息。 |
+| type | [AdminType](#admintype) | 是 | 激活的设备管理员类型。 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -67,7 +67,7 @@ adminManager.enableAdmin(wantTemp, enterpriseInfo, adminManager.AdminType.ADMIN_
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback\): void
-以异步方法根据给定的包名和类名激活设备管理员应用,使用Callback形式返回是否激活成功。
+激活指定用户下的指定设备管理员应用,使用callback形式返回是否激活成功。其中超级管理员应用只能在管理员用户下被激活。
**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
@@ -79,11 +79,11 @@ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId
| 参数名 | 类型 | 必填 | 说明 |
| -------------- | ----------------------------------- | ---- | ---------------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
-| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | 是 | 设备管理员应用的企业信息 |
-| type | [AdminType](#admintype) | 是 | 激活的设备管理员类型 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
+| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | 是 | 设备管理员应用的企业信息。 |
+| type | [AdminType](#admintype) | 是 | 激活的设备管理员类型。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
-| callback | AsyncCallback\ | 是 | callback方式返回是否激活成功 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -119,7 +119,7 @@ adminManager.enableAdmin(wantTemp, enterpriseInfo, adminManager.AdminType.ADMIN_
enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise\
-以异步方法根据给定的包名和类名激活设备管理员应用,使用Promise形式返回是否激活成功。
+如果调用接口时传入了可选参数userId,则激活指定用户下的指定设备管理员应用,否则激活当前用户下的指定设备管理员应用,使用Promise形式返回是否激活成功。其中超级管理员应用只能在管理员用户下被激活。
**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
@@ -131,16 +131,16 @@ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId
| 参数名 | 类型 | 必填 | 说明 |
| -------------- | ----------------------------------- | ---- | ---------------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
-| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | 是 | 设备管理员应用的企业信息 |
-| type | [AdminType](#admintype) | 是 | 激活的设备管理员类型 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
+| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | 是 | 设备管理员应用的企业信息。 |
+| type | [AdminType](#admintype) | 是 | 激活的设备管理员类型。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
**返回值:**
| 类型 | 说明 |
| ----------------- | ----------------- |
-| Promise\ | Promise形式返回是否激活成功 |
+| Promise\ | 无返回结果的Promise对象。当激活设备管理员应用失败时会抛出错误对象。 |
**错误码**:
@@ -173,7 +173,7 @@ adminManager.enableAdmin(wantTemp, enterpriseInfo, adminManager.AdminType.ADMIN_
disableAdmin(admin: Want, callback: AsyncCallback\): void
-以异步方法根据给定的包名和类名将设备普通管理员应用去激活,使用Callback形式返回是否去激活成功。
+将当前用户下的指定普通管理员应用去激活,使用callback形式返回是否去激活成功。
**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
@@ -185,8 +185,8 @@ disableAdmin(admin: Want, callback: AsyncCallback\): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------- | ---- | ------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 普通设备管理员应用 |
-| callback | AsyncCallback\ | 是 | callback方式返回是否去激活成功 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 普通设备管理员应用。 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -216,7 +216,7 @@ adminManager.disableAdmin(wantTemp, error => {
disableAdmin(admin: Want, userId: number, callback: AsyncCallback\): void
-以异步方法根据给定的包名和类名将设备普通管理员应用去激活,使用Callback形式返回是否去激活成功。
+将指定用户下的指定普通管理员应用去激活,使用callback形式返回是否去激活成功。
**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
@@ -228,9 +228,9 @@ disableAdmin(admin: Want, userId: number, callback: AsyncCallback\): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------- | ---- | ---------------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 普通设备管理员应用 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 普通设备管理员应用。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
-| callback | AsyncCallback\ | 是 | callback方式返回是否去激活成功 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -260,7 +260,7 @@ adminManager.disableAdmin(wantTemp, 100, error => {
disableAdmin(admin: Want, userId?: number): Promise\
-以异步方法根据给定的包名和类名将设备普通管理员应用去激活,使用Promise形式返回是否去激活成功。
+如果调用接口时传入了可选参数userId,则将指定用户下的指定普通管理员应用去激活,否则将当前用户下的指定普通管理员应用去激活,使用Promise形式返回是否去激活成功。
**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
@@ -272,14 +272,14 @@ disableAdmin(admin: Want, userId?: number): Promise\
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ----------------------------------- | ---- | ---------------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 普通设备管理员应用 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 普通设备管理员应用。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
**返回值:**
| 类型 | 说明 |
| ----------------- | ----------------- |
-| Promise\ | Promise形式返回是否激活成功 |
+| Promise\ | 无返回结果的Promise对象。当去激活普通管理员应用失败时会抛出错误对象。 |
**错误码**:
@@ -305,7 +305,7 @@ adminManager.disableAdmin(wantTemp, 100).catch(error => {
disableSuperAdmin(bundleName: String, callback: AsyncCallback\): void
-以异步方法根据给定的包名将设备超级管理员应用去激活,使用Callback形式返回是否去激活成功。
+根据bundleName将管理员用户下的超级管理员应用去激活,使用callback形式返回是否去激活成功。
**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
@@ -317,8 +317,8 @@ disableSuperAdmin(bundleName: String, callback: AsyncCallback\): void
| 参数名 | 类型 | 必填 | 说明 |
| ---------- | ----------------------- | ---- | ------------------- |
-| bundleName | String | 是 | 超级设备管理员应用的包名 |
-| callback | AsyncCallback\ | 是 | callback方式返回是否去激活成功 |
+| bundleName | String | 是 | 超级设备管理员应用的包名。 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -345,7 +345,7 @@ adminManager.disableSuperAdmin(bundleName, error => {
disableSuperAdmin(bundleName: String): Promise\
-以异步方法根据给定的包名将设备超级管理员应用去激活,使用Promise形式返回是否去激活成功。
+根据bundleName将管理员用户下的超级管理员应用去激活,使用Promise形式返回是否去激活成功。
**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
@@ -357,13 +357,13 @@ disableSuperAdmin(bundleName: String): Promise\
| 参数名 | 类型 | 必填 | 说明 |
| ---------- | ------ | ---- | ------------ |
-| bundleName | String | 是 | 超级设备管理员应用的包名 |
+| bundleName | String | 是 | 超级设备管理员应用的包名。 |
**返回值:**
| 类型 | 说明 |
| ----------------- | ----------------- |
-| Promise\ | Promise形式返回是否激活成功 |
+| Promise\ | 无返回结果的Promise对象。当去激活超级管理员应用失败时会抛出错误对象。 |
**错误码**:
@@ -386,7 +386,7 @@ adminManager.disableSuperAdmin(bundleName).catch(error => {
isAdminEnabled(admin: Want, callback: AsyncCallback\): void
-以异步方法根据给定的包名和类名判断设备管理员应用是否被激活,使用Callback形式返回是否处于激活状态。
+查询当前用户下的指定设备管理员应用是否被激活,使用callback形式返回是否处于激活状态。
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
@@ -396,8 +396,8 @@ isAdminEnabled(admin: Want, callback: AsyncCallback\): void
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------- | ---- | -------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
-| callback | AsyncCallback\ | 是 | callback方式返回是否处于激活状态 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,data为boolean值,true表示当前用户下的指定设备管理员应用被激活,false表示当前用户下的指定设备管理员应用未激活,否则err为错误对象。 |
**示例**:
@@ -419,7 +419,7 @@ adminManager.isAdminEnabled(wantTemp, (error, result) => {
isAdminEnabled(admin: Want, userId: number, callback: AsyncCallback\): void
-以异步方法根据给定的包名和类名判断设备管理员应用是否被激活,使用Callback形式返回是否处于激活状态。
+查询指定用户下的指定设备管理员应用是否被激活,使用callback形式返回是否处于激活状态。
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
@@ -429,9 +429,9 @@ isAdminEnabled(admin: Want, userId: number, callback: AsyncCallback\):
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------- | ---- | ---------------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
-| callback | AsyncCallback\ | 是 | callback方式返回是否处于激活状态 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,data为boolean值,true表示当前用户下的指定设备管理员应用被激活,false表示当前用户下的指定设备管理员应用未激活,否则err为错误对象。 |
**示例**:
@@ -453,7 +453,7 @@ adminManager.isAdminEnabled(wantTemp, 100, (error, result) => {
isAdminEnabled(admin: Want, userId?: number): Promise\
-以异步方法根据给定的包名和类名判断设备管理员应用是否被激活,使用Promise形式返回是否处于激活状态。
+如果调用接口时传入参数userId,则查询指定用户下的设备管理员应用是否被激活,否则判断当前用户下的设备管理员应用是否被激活,使用Promise形式返回是否处于激活状态。
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
@@ -463,14 +463,14 @@ isAdminEnabled(admin: Want, userId?: number): Promise\
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ----------------------------------- | ---- | ---------------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 |
**返回值:**
| 类型 | 说明 |
| ----------------- | ------------------- |
-| Promise\ | Promise形式返回是否处于激活状态 |
+| Promise\ | Promise对象, 返回true表示指定的管理员应用被激活,返回false表示指定的管理员应用未激活。|
**示例**:
@@ -490,7 +490,7 @@ adminManager.isAdminEnabled(wantTemp, 100).then((result) => {
isSuperAdmin(bundleName: String, callback: AsyncCallback\): void
-以异步方法根据给定的包名判断设备超级管理员应用是否被激活,使用Callback形式返回是否处于激活状态。
+根据bundleName查询管理员用户下的超级管理员应用是否被激活,使用callback形式返回是否处于激活状态。
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
@@ -500,8 +500,8 @@ isSuperAdmin(bundleName: String, callback: AsyncCallback\): void
| 参数名 | 类型 | 必填 | 说明 |
| ---------- | ----------------------- | ---- | -------------------- |
-| bundleName | String | 是 | 设备管理员应用 |
-| callback | AsyncCallback\ | 是 | callback方式返回是否处于激活状态 |
+| bundleName | String | 是 | 设备管理员应用。 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,data为boolean类型值,true表示当前用户下的指定设备管理员应用被激活,false表示当前用户下的指定设备管理员应用未激活,否则err为错误对象。 |
**示例**:
@@ -520,7 +520,7 @@ adminManager.isSuperAdmin(bundleName, (error, result) => {
isSuperAdmin(bundleName: String): Promise\
-以异步方法根据给定的包名判断设备超级管理员应用是否被激活,使用Promise形式返回是否处于激活状态。
+根据bundleName查询管理员用户下的超级管理员应用是否被激活,使用Promise形式返回是否处于激活状态。
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
@@ -530,13 +530,13 @@ isSuperAdmin(bundleName: String): Promise\
| 参数名 | 类型 | 必填 | 说明 |
| ---------- | ------ | ---- | --------- |
-| bundleName | String | 是 | 超级设备管理员应用 |
+| bundleName | String | 是 | 超级设备管理员应用。 |
**返回值:**
| 错误码ID | 错误信息 |
| ----------------- | ------------------- |
-| Promise\ | Promise形式返回是否处于激活状态 |
+| Promise\ | Promise对象, 返回true表示指定的超级管理员应用被激活,返回false表示指定的超级管理员应用未激活。 |
**示例**:
@@ -553,7 +553,7 @@ adminManager.isSuperAdmin(bundleName).then((result) => {
setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo, callback: AsyncCallback\;): void
-设置设备管理员应用的企业信息,使用callback形式返回是否设置成功。
+设置指定设备管理员应用的企业信息,使用callback形式返回是否设置成功。
**需要权限:** ohos.permission.SET_ENTERPRISE_INFO
@@ -565,9 +565,9 @@ setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo, callback: AsyncCa
| 参数名 | 类型 | 必填 | 说明 |
| -------------- | ----------------------------------- | ---- | ---------------------- |
-| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
-| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | 是 | 设备管理员应用的企业信息 |
-| callback | AsyncCallback\; | 是 | callback方式返回是否设置企业信息成功 |
+| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
+| enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | 是 | 设备管理员应用的企业信息。 |
+| callback | AsyncCallback\; | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -601,7 +601,7 @@ adminManager.setEnterpriseInfo(wantTemp, enterpriseInfo, error => {
setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo): Promise\;
-设置设备管理员应用的企业信息,使用Promise形式返回是否设置成功。
+设置指定设备管理员应用的企业信息,使用Promise形式返回是否设置成功。
**需要权限:** ohos.permission.SET_ENTERPRISE_INFO
@@ -620,7 +620,7 @@ setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo): Promise\;
| 类型 | 说明 |
| ----------------- | --------------------- |
-| Promise\ | Promise方式返回是否设置企业信息成功 |
+| Promise\ | 无返回结果的Promise对象。当设置设备管理员应用企业信息失败时会抛出错误对象。 |
**错误码**:
@@ -650,7 +650,7 @@ adminManager.setEnterpriseInfo(wantTemp, enterpriseInfo).catch(error => {
getEnterpriseInfo(admin: Want, callback: AsyncCallback<EnterpriseInfo>): void
-获取设备管理员应用的企业信息,使用callback形式返回设备管理员应用的企业信息。
+获取指定设备管理员应用的企业信息,使用callback形式返回设备管理员应用的企业信息。
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
@@ -661,7 +661,7 @@ getEnterpriseInfo(admin: Want, callback: AsyncCallback<EnterpriseInfo>): v
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------------- | ---- | ------------------------ |
| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用 |
-| callback | AsyncCallback<[EnterpriseInfo](#enterpriseinfo)> | 是 | callback方式返回设备管理员应用的企业信息 |
+| callback | AsyncCallback<[EnterpriseInfo](#enterpriseinfo)> | 是 | 回调函数,当接口调用成功,err为null,data为设备管理员应用的企业信息,否则err为错误对象。 |
**错误码**:
@@ -692,7 +692,7 @@ adminManager.getEnterpriseInfo(wantTemp, (error, result) => {
getEnterpriseInfo(admin: Want): Promise<EnterpriseInfo>
-获取设备管理员应用的企业信息,使用Promise形式返回设备管理员应用的企业信息。
+获取指定设备管理员应用的企业信息,使用Promise形式返回设备管理员应用的企业信息。
**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
@@ -708,7 +708,7 @@ getEnterpriseInfo(admin: Want): Promise<EnterpriseInfo>
| 类型 | 说明 |
| ---------------------------------------- | ------------------------- |
-| Promise<[EnterpriseInfo](#enterpriseinfo)> | Promise方式返回设备管理员应用的企业信息对象 |
+| Promise<[EnterpriseInfo](#enterpriseinfo)> | Promise对象,返回指定设备管理员应用的企业信息。 |
**错误码**:
@@ -737,7 +737,7 @@ adminManager.getEnterpriseInfo(wantTemp).then((result) => {
subscribeManagedEvent(admin: Want, managedEvents: Array\, callback: AsyncCallback\): void
-订阅系统管理事件。使用callback异步回调。
+指定设备管理员应用订阅系统管理事件。使用callback形式返回结果。
**需要权限:** ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT
@@ -751,7 +751,7 @@ subscribeManagedEvent(admin: Want, managedEvents: Array\, callback
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
| managedEvents | Array\<[ManagedEvent](#managedevent)> | 是 | 订阅事件数组。 |
-| callback | AsyncCallback\ | 是 | 回调函数。当系统管理事件订阅成功err为null,否则为错误对象。 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -781,7 +781,7 @@ adminManager.subscribeManagedEvent(wantTemp, events, (error) => {
subscribeManagedEvent(admin: Want, managedEvents: Array\): Promise\
-订阅系统管理事件。使用Promise异步回调。
+指定设备管理员应用订阅系统管理事件。使用Promise形式返回结果。
**需要权限:** ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT
@@ -800,7 +800,7 @@ subscribeManagedEvent(admin: Want, managedEvents: Array\): Promise
| 类型 | 说明 |
| ----- | ----------------------------------- |
-| Promise\ | Promise对象。无返回结果的Promise对象。 |
+| Promise\ | 无返回结果的Promise对象。当指定设备管理员应用订阅系统事件失败时会抛出错误对象。 |
**错误码**:
@@ -829,7 +829,7 @@ adminManager.subscribeManagedEvent(wantTemp, events).then(() => {
unsubscribeManagedEvent(admin: Want, managedEvents: Array\, callback: AsyncCallback\): void
-取消订阅系统管理事件。使用callback异步回调。
+指定设备管理员应用取消订阅系统管理事件。使用callback形式返回结果。
**需要权限:** ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT
@@ -843,7 +843,7 @@ unsubscribeManagedEvent(admin: Want, managedEvents: Array\, callba
| ----- | ----------------------------------- | ---- | ------- |
| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 |
| managedEvents | Array\<[ManagedEvent](#managedevent)> | 是 | 取消订阅事件数组。 |
-| callback | AsyncCallback\ | 是 | 回调函数。当系统管理事件取消订阅成功err为null,否则为错误对象。 |
+| callback | AsyncCallback\ | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 |
**错误码**:
@@ -873,7 +873,7 @@ adminManager.unsubscribeManagedEvent(wantTemp, events, (error) => {
unsubscribeManagedEvent(admin: Want, managedEvents: Array\): Promise\
-取消订阅系统管理事件。使用callback异步回调。
+指定设备管理员应用取消订阅系统管理事件。使用Promise形式返回结果。
**需要权限:** ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT
@@ -892,7 +892,7 @@ unsubscribeManagedEvent(admin: Want, managedEvents: Array\): Promi
| 类型 | 说明 |
| ----- | ----------------------------------- |
-| Promise\ | Promise对象。无返回结果的Promise对象。 |
+| Promise\ | 无返回结果的Promise对象。当指定设备管理员应用取消订阅系统管理时间失败时会抛出错误对象。 |
**错误码**:
diff --git a/zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md b/zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md
index 66249739bb2d229bb2a855b5cb71e76cc70d9b4e..1f07f73ff0ef1c72242ced25dd950f3d97e0d5eb 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md
@@ -16,7 +16,7 @@ import bundleManager from '@ohos.enterprise.bundleManager';
addAllowedInstallBundles(admin: Want, appIds: Array\