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

!7866 翻译完成:6559 包管理缺陷扫描修改

Merge pull request !7866 from wusongqing/TR6559
......@@ -12,10 +12,6 @@ The **Bundle** module provides APIs for querying the information about bundles,
import bundle from '@ohos.bundle';
```
## System Capability
SystemCapability.BundleManager.BundleFramework
## Required Permissions
| Required Permissions | Permission Level | Description |
......@@ -689,7 +685,7 @@ This is a system API and cannot be called by third-party applications.
| ----------- | --------------------------- | ---- | ---------------------- |
| bundleName | string | Yes | Bundle name of an application. |
| moduleName | string | Yes | Module name of the application. |
| upgradeFlag | [UpgradeFlag](#upgradeflag) | Yes | Upgrade flag, which is used only by the internal system.|
| upgradeFlag | [UpgradeFlag](#upgradeflag) | Yes | Upgrade flag, which is for internal use only.|
**Return value**
......@@ -717,7 +713,7 @@ This is a system API and cannot be called by third-party applications.
| ---------- | ---------------------- | ---- | --------------------------------------------- |
| bundleName | string | Yes | Bundle name of an application. |
| moduleName | string | Yes | Module name of the application. |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. If the module is removable, **true** is returned. Otherwise, **false** is returned.|
| callback | AsyncCallback\<boolean> | Yes | Callback used to return the result. If the module is removable, **true** is returned. Otherwise, **false** is returned.|
## bundle.isModuleRemovable<sup>9+</sup>
......@@ -744,7 +740,7 @@ This is a system API and cannot be called by third-party applications.
| Type | Description |
| ---------------- | ---------------------------- |
| Promise<boolean> | Promise used to return the result. If the module is removable, **true** is returned. Otherwise, **false** is returned.|
| Promise\<boolean> | Promise used to return the result. If the module is removable, **true** is returned. Otherwise, **false** is returned.|
## bundle.getBundlePackInfo<sup>9+</sup>
......@@ -1897,8 +1893,8 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| -------------- | ------ | ---- | ---------------------------------------- |
| want | [Want](js-apis-application-Want.md) | Yes | Want that contains the bundle name. |
| extensionType | number | Yes | Type of the Extension ability information to obtain. The default value is **0**. For details on the available enumerated values, see [ExtensionAbilityType](#ExtensionAbilityType9).|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. For details on the available enumerated values, see [ExtensionFlags](#ExtensionFlag9).|
| extensionType | number | Yes | Type of the Extension ability information to obtain. The default value is **0**. For details on the available enumerated values, see [ExtensionAbilityType](#extensionabilitytype9).|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. For details on the available enumerated values, see [ExtensionFlags](#extensionflag9).|
| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
**Return value**
......@@ -1946,8 +1942,8 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory| Description |
| -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| want | [Want](js-apis-application-Want.md) | Yes | Want that contains the bundle name. |
| extensionType | number | Yes | Type of the Extension ability information to obtain. The default value is **0**. For details on the available enumerated values, see [ExtensionAbilityType](#ExtensionAbilityType9).|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. For details on the available enumerated values, see [ExtensionFlags](#ExtensionFlag9).|
| extensionType | number | Yes | Type of the Extension ability information to obtain. The default value is **0**. For details on the available enumerated values, see [ExtensionAbilityType](#extensionabilitytype9).|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. For details on the available enumerated values, see [ExtensionFlags](#extensionflag9).|
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0. |
| callback | AsyncCallback<Array\<[ExtensionAbilityInfo](js-apis-bundle-ExtensionAbilityInfo.md)>> | Yes | Callback used to return the Extension ability information. |
......@@ -1989,8 +1985,8 @@ SystemCapability.BundleManager.BundleFramework
| Name | Type | Mandatory | Description |
| -------------- | ---------------------------------------- | ---- | ---------------------------------------- |
| want | [Want](js-apis-application-Want.md) | Yes | Want that contains the bundle name. |
| extensionType | number | Yes | Type of the Extension ability information to obtain. The default value is **0**. For details on the available enumerated values, see [ExtensionAbilityType](#ExtensionAbilityType9).|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. For details on the available enumerated values, see [ExtensionFlags](#ExtensionFlag9).|
| extensionType | number | Yes | Type of the Extension ability information to obtain. The default value is **0**. For details on the available enumerated values, see [ExtensionAbilityType](#extensionabilitytype9).|
| extensionFlags | number | Yes | Extension ability information to be returned. The default value is **0**. For details on the available enumerated values, see [ExtensionFlags](#extensionflag9).|
| callback | AsyncCallback<Array\<[ExtensionAbilityInfo](js-apis-bundle-ExtensionAbilityInfo.md)>> | Yes | Callback used to return the Extension ability information. |
**Example**
......
# Metadata
The **Metadata** module provides the metadata information.
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Provides the metadata information.
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Metadata
**System capability**: SystemCapability.BundleManager.BundleFramework
| Name | Type | Readable| Writable| Description |
| -------- | ------ | ---- | ---- | ---------- |
| name | string | Yes | Yes | Metadata name.|
| value | string | Yes | Yes | Metadata value. |
| resource | string | Yes | Yes | Metadata resource.|
# Zip
> **NOTE**
>
>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Constraints
......@@ -136,7 +136,7 @@ zlib.unzipFile(inFile, outFile, options).then((data) => {
| Name | Value | Description |
| ----------------- | ---- | -------------------------------- |
| MEM_LEVEL_MIN | 1 | Minimum memory used by the **zip** API during compression.|
| MEM_LEVEL_MIN | 9 | Maximum memory used by the **zip** API during compression.|
| MEM_LEVEL_MAX | 9 | Maximum memory used by the **zip** API during compression.|
| MEM_LEVEL_DEFAULT | 8 | Default memory used by the **zip** API during compression.|
## zip.CompressLevel
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册