提交 b43b4102 编写于 作者: G Gloria

Update docs against 11610+11804+11904+11911+11956+12069+11470+12031

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 a2c3bd87
......@@ -45,7 +45,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified app ID is not found. |
**Example**
......@@ -91,7 +91,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified app ID is not found. |
**Example**
......@@ -142,7 +142,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified app ID is not found. |
**Example**
......@@ -186,7 +186,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified app ID is not found. |
**Example**
......@@ -236,7 +236,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified app ID is not found. |
**Example**
......@@ -280,7 +280,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| ------ | -------------------------------------- |
| 17700005 | The specified appId was not found. |
| 17700005 | The specified app ID is not found. |
**Example**
......
......@@ -3,7 +3,6 @@
The **bundleManager** module provides APIs for querying information about bundles, applications, abilities, Extension abilities, and more.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
......@@ -101,13 +100,13 @@ Enumerates the types of Extension abilities.
| WORK_SCHEDULER | 1 | [WorkSchedulerExtensionAbility](../../task-management/work-scheduler-dev-guide.md): enables applications to execute non-real-time tasks when the system is idle.|
| INPUT_METHOD | 2 | [InputMethodExtensionAbility](js-apis-inputmethod-extension-ability.md): provides APIs for developing input method applications.|
| SERVICE | 3 | [ServiceExtensionAbility](../../ability/stage-serviceextension.md): enables applications to run in the background and provide services.|
| ACCESSIBILITY | 4 | [AccessibilityExtensionAbility](js-apis-application-AccessibilityExtensionAbility.md): provides accessibility for access to and operations on the UI.|
| ACCESSIBILITY | 4 | [AccessibilityExtensionAbility](js-apis-application-accessibilityExtensionAbility.md): provides accessibility for access to and operations on the UI.|
| DATA_SHARE | 5 | [DataShareExtensionAbility](../../database/database-datashare-guidelines.md): enables applications to read and write data.|
| FILE_SHARE | 6 | FileShareExtensionAbility: enables file sharing between applications. This ability is reserved.|
| STATIC_SUBSCRIBER| 7 | [StaticSubscriberExtensionAbility](js-apis-application-staticSubscriberExtensionAbility.md): provides APIs for processing static events, such as the startup event.|
| WALLPAPER | 8 | WallpaperExtensionAbility: provides APIs to implement the home screen wallpaper. This ability is reserved.|
| BACKUP | 9 | BackupExtensionAbility: provides APIs for backing up and restoring application data and public data. This ability is reserved.|
| WINDOW | 10 | [WindowExtensionAbility](js-apis-application-WindowExtensionAbility.md): allows system applications to display UIs of other applications.|
| WINDOW | 10 | [WindowExtensionAbility](js-apis-application-windowExtensionAbility.md): allows system applications to display UIs of other applications.|
| ENTERPRISE_ADMIN | 11 | [EnterpriseAdminExtensionAbility](js-apis-EnterpriseAdminExtensionAbility.md): provides APIs for processing enterprise management events, such as application installation events on devices and events indicating too many incorrect screen-lock password attempts.|
| THUMBNAIL | 13 | ThumbnailExtensionAbility: provides thumbnails for files. This ability is reserved.|
| PREVIEW | 14 | PreviewExtensionAbility: provides APIs for file preview so that other applications can be embedded and displayed in the current application. This ability is reserved.|
......@@ -410,6 +409,7 @@ Obtains the bundle information based on the given bundle name, bundle flags, and
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
......@@ -1547,7 +1547,7 @@ Clears cache files of a bundle. This API uses a promise to return the result.
| Type | Description |
| -------------- | ------------------------------------------------------------ |
| Promise\<void> | Promise used to return the result. If the operation is successful, no value is returned. Otherwise, an error message is returned.|
| Promise\<void> | Promise used to return the result. If the operation is successful, **true** is returned. Otherwise, **false** is returned.|
**Error codes**
......@@ -1556,7 +1556,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| -------- | ---------------------------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700030 | The specified bundle does not support cleaning cache files. |
| 17700030 | The specified bundle does not support clearing of cache files. |
**Example**
......@@ -1689,7 +1689,7 @@ Enables or disables an ability. This API uses an asynchronous callback to return
| Name | Type | Mandatory| Description |
| -------- | ----------- | ---- | ------------------------------------- |
| info | [AbilityInfo](js-apis-bundleManager-abilityInfo.md) | Yes | Information about the target ability. |
| isEnabled| boolean | Yes | Whether to enable the ability. The value **true** means to enable the ability, and **false** means to disable the ability.|
| isEnabled| boolean | Yes | Whether to enable the application. The value **true** means to enable the application, and **false** means to disable the application.|
| callback | AsyncCallback\<void> | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
......@@ -1750,7 +1750,7 @@ Enables or disables an ability. This API uses a promise to return the result.
| Name | Type | Mandatory| Description |
| -------- | ----------- | ---- | ------------------------------------- |
| info | [AbilityInfo](js-apis-bundleManager-abilityInfo.md) | Yes | Information about the target ability. |
| isEnabled| boolean | Yes | Whether to enable the ability. The value **true** means to enable the ability, and **false** means to disable the ability.|
| isEnabled| boolean | Yes | Whether to enable the application. The value **true** means to enable the application, and **false** means to disable the application.|
**Return value**
......@@ -2034,7 +2034,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user ID is not found |
| 17700004 | The specified user ID is not found. |
| 17700026 | The specified bundle is disabled. |
**Example**
......@@ -2083,7 +2083,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user ID is not found |
| 17700004 | The specified user ID is not found. |
| 17700026 | The specified bundle is disabled. |
**Example**
......@@ -2300,7 +2300,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed. |
| 17700003 | The specified extensionAbilityName is not existed. |
| 17700003 | The specified extensionAbilityName not existed. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700026 | The specified bundle is disabled. |
......@@ -2354,7 +2354,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed. |
| 17700003 | The specified extensionAbilityName is not existed. |
| 17700003 | The specified extensionAbilityName not existed. |
| 17700024 | Failed to get the profile because there is no profile in the HAP. |
| 17700026 | The specified bundle is disabled. |
......@@ -2735,7 +2735,7 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
| ID| Error Message |
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified userId is not found. |
| 17700004 | The specified user ID is not found. |
| 17700026 | The specified bundle is disabled. |
**Example**
......
......@@ -2,7 +2,7 @@
The **continuationManager** module provides the continuation management entry. You can use the APIs of this module to connect to and cancel the continuation management service, subscribe to and unsubscribe from device connection events, start the device selection module, and update the device connection state.
Currently, this module provides incomplete functions, and its APIs are mainly used to start the device selection module. **The continuation capability is not available for application development.**
Currently, this module provides incomplete functions, and its APIs are mainly used to start the device selection module. The continuation capability is not available for application development.
> **NOTE**
>
......@@ -38,7 +38,7 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360207 | The maximum number of registrations exceeded. |
| 29360207 | The number of registrations has reached the upper limit. |
**Example**
......@@ -79,7 +79,7 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360207 | The maximum number of registrations exceeded. |
| 29360207 | The number of registrations has reached the upper limit. |
| 29360216 | Invalid continuation mode. |
**Example**
......@@ -129,7 +129,7 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object |
| 7 | The object is null. |
| 29360207 | The maximum number of registrations exceeded. |
| 29360207 | The number of registrations has reached the upper limit. |
| 29360216 | Invalid continuation mode. |
**Example**
......@@ -171,8 +171,7 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600001 | The system ability works abnormally. |
| 16600003 | The number of token registration times has reached the upper limit. |
**Example**
......@@ -216,8 +215,7 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600001 | The system ability works abnormally. |
| 16600003 | The number of token registration times has reached the upper limit. |
**Example**
......@@ -269,8 +267,7 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600001 | The system ability works abnormally. |
| 16600003 | The number of token registration times has reached the upper limit. |
**Example**
......@@ -320,8 +317,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object |
| 7 | The object is null | 7 |
| 29360208 | The token has not registered. |
| 29360209 | Callback has been registered. |
| 29360208 | The token is not registered. |
| 29360209 | The callback has been registered. |
| 29360214 | The type of callback is not supported. |
**Example**
......@@ -359,8 +356,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360208 | The token has not registered. |
| 29360209 | Callback has been registered. |
| 29360208 | The token is not registered. |
| 29360209 | The callback has been registered. |
| 29360214 | The type of callback is not supported. |
**Example**
......@@ -396,8 +393,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360208 | The token has not registered. |
| 29360210 | Callback has not registered. |
| 29360208 | The token is not registered. |
| 29360210 | The callback is not registered. |
| 29360214 | The type of callback is not supported. |
**Example**
......@@ -435,8 +432,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360208 | The token has not registered. |
| 29360210 | Callback has not registered. |
| 29360208 | The token is not registered. |
| 29360210 | The callback is not registered. |
| 29360214 | The type of callback is not supported. |
**Example**
......@@ -471,9 +468,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
| 16600004 | The specified callback has been registered. |
**Example**
......@@ -518,9 +514,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
| 16600004 | The specified callback has been registered. |
**Example**
......@@ -565,9 +560,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
| 16600004 | The specified callback has been registered. |
**Example**
......@@ -604,9 +598,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
| 16600004 | The specified callback has been registered. |
**Example**
......@@ -645,9 +638,9 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360208 | The token has not registered. |
| 29360210 | Callback has not registered. |
| 29360211 | Failed to connect ability. |
| 29360208 | The token is not registered. |
| 29360210 | The callback is not registered. |
| 29360211 | Failed to connect to the ability. |
| 29360216 | Invalid continuation mode. |
**Example**
......@@ -689,9 +682,9 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object |
| 7 | The object is null |
| 29360208 | The token has not registered. |
| 29360210 | Callback has not registered. |
| 29360211 | Failed to connect ability. |
| 29360208 | The token is not registered. |
| 29360210 | The callback is not registered. |
| 29360211 | Failed to connect to the ability. |
| 29360216 | Invalid continuation mode. |
**Example**
......@@ -741,9 +734,9 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object |
| 7 | The object is null |
| 29360208 | The token has not registered. |
| 29360210 | Callback has not registered. |
| 29360211 | Failed to connect ability. |
| 29360208 | The token is not registered. |
| 29360210 | The callback is not registered. |
| 29360211 | Failed to connect to the ability. |
| 29360216 | Invalid continuation mode. |
**Example**
......@@ -785,9 +778,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
**Example**
......@@ -830,9 +822,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
**Example**
......@@ -883,9 +874,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
**Example**
......@@ -934,10 +924,10 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360208 | The token has not registered. |
| 29360210 | Callback has not registered. |
| 29360211 | Failed to connect ability. |
| 29360215 | Invalid connect state. |
| 29360208 | The token is not registered. |
| 29360210 | The callback is not registered. |
| 29360211 | Failed to connect to the ability. |
| 29360215 | Invalid connection state. |
**Example**
......@@ -985,10 +975,10 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360208 | The token has not registered. |
| 29360210 | Callback has not registered. |
| 29360211 | Failed to connect ability. |
| 29360215 | Invalid connect state. |
| 29360208 | The token is not registered. |
| 29360210 | The callback is not registered. |
| 29360211 | Failed to connect to the ability. |
| 29360215 | Invalid connection state. |
**Example**
......@@ -1029,9 +1019,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
**Example**
......@@ -1081,9 +1070,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
**Example**
......@@ -1129,7 +1117,7 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360208 | The token has not registered. |
| 29360208 | The token is not registered. |
**Example**
......@@ -1174,7 +1162,7 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ------- | -------------------------------------------- |
| 3 | Failed to flatten the object. |
| 7 | The object is null. |
| 29360208 | The token has not registered. |
| 29360208 | The token is not registered. |
**Example**
......@@ -1212,9 +1200,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
**Example**
......@@ -1261,9 +1248,8 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er
| ID| Error Message|
| ------- | -------------------------------------------- |
| 401 | The parameter check failed. |
| 16600001 | The system ability work abnormally. |
| 16600002 | The specified token or callback has not registered. |
| 16600001 | The system ability works abnormally. |
| 16600002 | The specified token or callback is not registered. |
**Example**
......@@ -1289,14 +1275,12 @@ Enumerates the device connection states.
**System capability**: SystemCapability.Ability.DistributedAbilityManager
**Parameters**
| Name| Type| Value| Description|
| -------- | -------- | -------- | -------- |
| IDLE | number | 0 | The device is in the initial state.|
| CONNECTING | number | 1 | The device is being connected.|
| CONNECTED | number | 2 | The device is connected.|
| DISCONNECTING | number | 3 | The device is being disconnected.|
| Name| Value| Description|
| -------- | -------- | -------- |
| IDLE | 0 | The device is in the initial state.|
| CONNECTING | 1 | The device is being connected.|
| CONNECTED | 2 | The device is connected.|
| DISCONNECTING | 3 | The device is being disconnected.|
## ContinuationMode
......@@ -1304,9 +1288,7 @@ Enumerates the continuation modes provided by the device selection module.
**System capability**: SystemCapability.Ability.DistributedAbilityManager
**Parameters**
| Name| Type| Value| Description|
| -------- | -------- | -------- | -------- |
| COLLABORATION_SINGLE | number | 0 | Single-choice mode.|
| COLLABORATION_MULTIPLE | number | 1 | Multi-choice mode.|
| Name| Value| Description|
| -------- | -------- | -------- |
| COLLABORATION_SINGLE | 0 | Single-choice mode.|
| COLLABORATION_MULTIPLE | 1 | Multi-choice mode.|
......@@ -299,7 +299,7 @@ try {
getBundlePackInfo(bundleName: string, bundlePackFlag : BundlePackFlag): Promise\<BundlePackInfo>;
Obtains **bundlePackInfo** based on **bundleName** and **bundlePackFlag**. This API uses a promise to return the result.
Obtains **bundlePackInfo** based on **bundleName** and **bundleFlag**. This API uses a promise to return the result.
**System API**: This is a system API.
......@@ -363,10 +363,6 @@ Obtains the dispatch information. This API uses an asynchronous callback to retu
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback<[DispatchInfo](js-apis-bundleManager-dispatchInfo.md)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**, and **data** is the [DispatchInfo](js-apis-bundleManager-dispatchInfo.md) object obtained. otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
**Example**
```js
......@@ -402,10 +398,6 @@ Obtains the dispatch information. This API uses a promise to return the result.
| ------------------------------------------------ | ------------------------------------------------------------ |
| Promise<[DispatchInfo](js-apis-bundleManager-dispatchInfo.md)> | Promise used to return the [DispatchInfo](js-apis-bundleManager-dispatchInfo.md) object obtained.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
**Example**
```js
......
......@@ -18,7 +18,7 @@ import installer from '@ohos.bundle.installer';
| ------------------------------ | ----------- | ---------------- |
| ohos.permission.INSTALL_BUNDLE | system_core | Permission to install or uninstall bundles.|
For details, see in [Permission Levels](../../security/accesstoken-overview.md#permission-levels).
For details, see [Permission Levels](../../security/accesstoken-overview.md#permission-levels).
## BundleInstaller.getBundleInstaller
......@@ -36,10 +36,6 @@ Obtains a **BundleInstaller** object. This API uses an asynchronous callback to
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| callback | AsyncCallback\<[BundleInstaller](js-apis-installer.md#BundleInstaller)> | Yes | Callback used to return the result. If the operation is successful, **err** is undefined and **data** is the **BundleInstaller** object obtained; otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
**Example**
```ts
......@@ -73,10 +69,6 @@ Obtains a **BundleInstaller** object. This API uses an asynchronous callback to
| ------------------------------------------------------------ | ------------------------------------ |
| Promise\<[BundleInstaller](js-apis-installer.md#BundleInstaller)> | Promise used to return the **BundleInstaller** object obtained.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
**Example**
```ts
......@@ -278,10 +270,10 @@ Defines the hash parameters for bundle installation and uninstall.
**System API**: This is a system API and cannot be called by third-party applications.
| Name | Type | Description |
| ---------- | ------ | ---------------- |
| moduleName | string | Module name of the bundle.|
| hashValue | string | Hash value. |
| Name | Type | Mandatory| Description |
| ---------- | ------ | ---------------- | ---------------- |
| moduleName | string | Yes| Module name of the bundle.|
| hashValue | string | Yes| Hash value. |
## InstallParam
......@@ -291,10 +283,10 @@ Defines the parameters that need to be specified for bundle installation, uninst
**System API**: This is a system API and cannot be called by third-party applications.
| Name | Type | Description |
| ------------------------------ | ------------------------------ | ------------------ |
| userId | number | User ID. You can use [queryOsAccountLocalIdFromProcess](js-apis-osAccount.md#queryosaccountlocalidfromprocess9) to obtain the user of the current process.|
| installFlag | number | Installation flag. The value **0** means initial installation and **1** means overwrite installation.|
| isKeepData | boolean | Whether to retain the data directory during bundle uninstall.|
| hashParams | Array<[HashParam](#hashparam)> | Hash parameters. |
| crowdtestDeadline| number |End date of crowdtesting.|
| Name | Type | Mandatory | Description |
| ------------------------------ | ------------------------------ | ------------------ | ------------------ |
| userId | number | Yes | User ID. You can use [queryOsAccountLocalIdFromProcess](js-apis-osAccount.md#queryosaccountlocalidfromprocess9) to obtain the user of the current process.|
| installFlag | number | Yes | Installation flag. The value **0** means initial installation and **1** means overwrite installation.|
| isKeepData | boolean | Yes | Whether to retain the data directory during bundle uninstall.|
| hashParams | Array<[HashParam](#hashparam)> | Yes| Hash parameters. |
| crowdtestDeadline| number | Yes |End date of crowdtesting.|
......@@ -1182,8 +1182,6 @@ Deregisters the callback for application group changes. This API uses a promise
**System API**: This is a system API.
**Parameters**: none
**Return value**
| Type | Description |
......@@ -1297,7 +1295,7 @@ For details about the error codes, see [DeviceUsageStatistics Error Codes](../er
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
**Example**
......@@ -1345,7 +1343,7 @@ For details about the error codes, see [DeviceUsageStatistics Error Codes](../er
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
**Example**
......@@ -1400,7 +1398,7 @@ For details about the error codes, see [DeviceUsageStatistics Error Codes](../er
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
**Example**
......@@ -1448,7 +1446,7 @@ For details about the error codes, see [DeviceUsageStatistics Error Codes](../er
| 10000002 | Parcel operation failed. |
| 10000003 | System service operation failed. |
| 10000004 | IPC Communication failed. |
| 10000006 | Get application info failed |
| 10000006 | Get application info failed. |
| 10000007 | Get system or actual time failed. |
**Example**
......@@ -1566,6 +1564,8 @@ Provides the usage duration information of an application.
**System capability**: SystemCapability.ResourceSchedule.UsageStatistics.App
**System API**: This is a system API.
| Name | Type | Mandatory | Description |
| ------------------------------ | ---------------------------------------- | ---- | -------------- |
| [key: string]: BundleStatsInfo | [key: string]: [BundleStatsInfo](#bundlestatsinfo) | Yes | Usage duration information by application.|
......@@ -1590,7 +1590,9 @@ Enumerates the interval types for querying the application usage duration.
**System capability**: SystemCapability.ResourceSchedule.UsageStatistics.App
| Name | Default Value | Description |
**System API**: This is a system API.
| Name | Value | Description |
| ------------ | ---- | ---------------------------------------- |
| BY_OPTIMIZED | 0 | The system queries the application usage duration statistics in the specified time frame at the interval the system deems appropriate.|
| BY_DAILY | 1 | The system queries the application usage duration statistics in the specified time frame on a daily basis. |
......@@ -1606,7 +1608,7 @@ Enumerates the application group types.
**System API**: This is a system API.
| Name | Default Value | Description |
| Name | Value | Description |
| ------------------ | ---- | ----------------- |
| ALIVE_GROUP | 10 | Group of active applications. |
| DAILY_GROUP | 20 | Group of frequently used applications that are not in the active state. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册