diff --git a/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md b/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md index 6fad182e98274663af3ded60c01fa955649ebfb4..dae9aefd44beb90aed973cb15b4e9461d135f36f 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md @@ -6,6 +6,8 @@ The **accountManager** module provides APIs for account management of enterprise > > - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. > +> - The APIs of this module can be used only in the stage model. +> > - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin). ## Modules to Import @@ -18,7 +20,7 @@ import accountManager from '@ohos.enterprise.accountManager'; disallowAddLocalAccount(admin: Want, disallow: boolean, callback: AsyncCallback<void>): void -Forbids a device administrator application to create local user accounts. This API uses an asynchronous callback to return the result. +Disallows a device administrator application to create local user accounts. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_ACCOUNT_POLICY @@ -30,8 +32,8 @@ Forbids a device administrator application to create local user accounts. This A | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Enterprise device administrator application. | -| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means that local user accounts cannot be created; the value **false** means the opposite. | +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | +| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means to disallow the creation of local user accounts, and the value **false** means the opposite. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** @@ -64,7 +66,7 @@ accountManager.disallowAddLocalAccount(wantTemp, true, (err) => { disallowAddLocalAccount(admin: Want, disallow: boolean): Promise<void> -Forbids a device administrator application to create local user accounts. This API uses a promise to return the result. +Disallows a device administrator application to create local user accounts. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_ACCOUNT_POLICY @@ -76,14 +78,14 @@ Forbids a device administrator application to create local user accounts. This A | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Enterprise device administrator application.| -| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means that local user accounts cannot be created; the value **false** means the opposite. | +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| +| disallow | boolean | Yes | Whether to forbid the creation of local user accounts. The value **true** means to disallow the creation of local user accounts, and the value **false** means the opposite. | **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. An error object will be thrown if the operation fails.| +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown.| **Error codes** diff --git a/en/application-dev/reference/apis/js-apis-enterprise-applicationManager.md b/en/application-dev/reference/apis/js-apis-enterprise-applicationManager.md index b2d127f28df7434b9bc3f2fad33f520109358178..00e17f92bd50d749a4940ae6f3b7efc48e1e0049 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-applicationManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-applicationManager.md @@ -6,6 +6,8 @@ The **applicationManager** module provides application management capabilities, > > - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. > +> - The APIs of this module can be used only in the stage model. +> > - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin). ## Modules to Import @@ -18,7 +20,7 @@ import applicationManager from '@ohos.enterprise.applicationManager'; addDisallowedRunningBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -Adds a list of applications that are forbidden to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Adds the applications that are not allowed to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -66,7 +68,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, (err) => { addDisallowedRunningBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; -Adds a list of applications that are forbidden to run by a given user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Adds the applications that are not allowed to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -80,7 +82,7 @@ Adds a list of applications that are forbidden to run by a given user through th | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | appIds | Array<string> | Yes | IDs of the applications to add. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -114,7 +116,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, 100, (err) => { addDisallowedRunningBundles(admin: Want, appIds: Array\, userId?: number): Promise<void>; -Adds a list of applications that are forbiddedn to run by the specified user (if **userId** is passed in) or current user (if **userId** is not passed in) through the specified device administrator application. +Adds the applications that are not allowed to run by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -128,13 +130,13 @@ Adds a list of applications that are forbiddedn to run by the specified user (if | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | appIds | Array<string> | Yes | IDs of the applications to add. | -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be run by the specified user.
- If **userId** is not passed in, the applications cannot be run by the current user.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. An error object is thrown when the applications fail to be added. | +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown. | **Error codes** @@ -165,7 +167,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, 100).then(() => removeDisallowedRunningBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -Removes a list of applications that are forbiddedn to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Removes the applications that are not allowed to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -212,7 +214,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, (err) => { removeDisallowedRunningBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; -Removes a list of applications that are forbiddedn to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Removes the applications that are not allowed to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -226,7 +228,7 @@ Removes a list of applications that are forbiddedn to run by the specified user | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | appIds | Array<string> | Yes | IDs of the applications to remove. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -260,7 +262,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, 100, (err) = removeDisallowedRunningBundles(admin: Want, appIds: Array\, userId?: number): Promise<void>; -Removes a list of applications that are forbiddedn to run by the specified user (if **userId** is passed in) or current user (if **userId** is not passed in) through the specified device administrator application. This API uses a promise to return the result. +Removes the applications that are not allowed to run by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -274,13 +276,13 @@ Removes a list of applications that are forbiddedn to run by the specified user | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | appIds | Array<string> | Yes | IDs of the applications to remove. | -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be run by the specified user.
- If **userId** is not passed in, the applications cannot be run by the current user.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. An error object is thrown when the applications fail to be removed. | +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown. | **Error codes** @@ -311,7 +313,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, 100).then(() getDisallowedRunningBundles(admin: Want, callback: AsyncCallback<Array<string>>): void; -Obtains the list of applications that are firbidded to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the applications that are not allowed to run by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -356,7 +358,7 @@ applicationManager.getDisallowedRunningBundles(wantTemp, (err, result) => { getDisallowedRunningBundles(admin: Want, userId: number, callback: AsyncCallback<Array<string>>): void; -Obtains the list of applications that are firbidded to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the applications that are not allowed to run by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -369,7 +371,7 @@ Obtains the list of applications that are firbidded to run by the specified user | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** @@ -402,7 +404,7 @@ applicationManager.getDisallowedRunningBundles(wantTemp, 100, (err, result) => { getDisallowedRunningBundles(admin: Want, userId?: number): Promise<Array<string>>; -Obtains the list of applications that are firbidded to run by the specified user (if **userId** is passed in) or current user (if **userId** is not passed in) through the specified device administrator application. This API uses a promise to return the result. +Obtains the applications that are not allowed to run by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -415,7 +417,7 @@ Obtains the list of applications that are firbidded to run by the specified user | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be run by the specified user.
- If **userId** is not passed in, the applications cannot be run by the current user.| **Return value** diff --git a/en/application-dev/reference/apis/js-apis-enterprise-bundleManager.md b/en/application-dev/reference/apis/js-apis-enterprise-bundleManager.md index 5eea933ded9cbe5cbd3c82aa477c1ff4ea32b923..949307fcf0c0ac3211aa279c99412fe0d53551c4 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-bundleManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-bundleManager.md @@ -6,6 +6,7 @@ The **bundleManager** module provides APIs for bundle management, including addi > > - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. > +> - The APIs of this module can be used only in the stage model. > > - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin). @@ -19,7 +20,7 @@ import bundleManager from '@ohos.enterprise.bundleManager'; addAllowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -Adds a list of bundles that are allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Adds the applications that can be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -32,7 +33,7 @@ Adds a list of bundles that are allowed to be installed by the current user thro | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | +| appIds | Array<string> | Yes | IDs of the applications to add. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -66,7 +67,7 @@ bundleManager.addAllowedInstallBundles(wantTemp, appIds, (err) => { addAllowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; -Adds a list of bundles that are allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result. +Adds the applications that can be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -79,8 +80,8 @@ Adds a list of bundles that are allowed to be installed by the given user (speci | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to add. | +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -114,7 +115,7 @@ bundleManager.addAllowedInstallBundles(wantTemp, appIds, 100, (err) => { addAllowedInstallBundles(admin: Want, appIds: Array\, userId?: number): Promise<void>; -Adds a list of bundles that are allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. +Adds the applications that can be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -127,14 +128,14 @@ Adds a list of bundles that are allowed to be installed by the current user (if | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to add. | +| userId | number | No |User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications can be installed by the specified user.
- If **userId** is not passed in, the applications can be installed by the current user.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. If the operation fails, an error object is thrown. | +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown. | **Error codes** @@ -165,7 +166,7 @@ bundleManager.addAllowedInstallBundles(wantTemp, appIds, 100).then(() => { removeAllowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -Removes a list of bundles that are allowed to be installed by the current user through the specified device administrator application. The bundles removed from the list can no longer be installed. This API uses an asynchronous callback to return the result. +Removes the applications that can be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -178,7 +179,7 @@ Removes a list of bundles that are allowed to be installed by the current user t | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be removed. | +| appIds | Array<string> | Yes | IDs of the applications to remove. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -212,7 +213,7 @@ bundleManager.removeAllowedInstallBundles(wantTemp, appIds, (err) => { removeAllowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; -Removes a list of bundles that are allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. The bundles removed from the list can no longer be installed. This API uses an asynchronous callback to return the result. +Removes the applications that can be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -225,8 +226,8 @@ Removes a list of bundles that are allowed to be installed by the given user (sp | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be removed. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to remove. | +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -260,7 +261,7 @@ bundleManager.removeAllowedInstallBundles(wantTemp, appIds, 100, (err) => { removeAllowedInstallBundles(admin: Want, appIds: Array\, userId?: number): Promise<void>; -Removes a list of bundles that are allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. The bundles removed from the list can no longer be installed. This API uses a promise to return the result. +Removes the applications that can be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -273,14 +274,14 @@ Removes a list of bundles that are allowed to be installed by the current user ( | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array\<string> | Yes | Bundles to be removed. | -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array\<string> | Yes | IDs of the applications to remove. | +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications can be installed by the specified user.
- If **userId** is not passed in, the applications can be installed by the current user.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. If the operation fails, an error object is thrown. | +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown. | **Error codes** @@ -311,7 +312,7 @@ bundleManager.removeAllowedInstallBundles(wantTemp, appIds, 100).then(() => { getAllowedInstallBundles(admin: Want, callback: AsyncCallback<Array<string>>): void; -Obtains the list of bundles that are allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the applications that can be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -356,7 +357,7 @@ bundleManager.getAllowedInstallBundles(wantTemp, (err, result) => { getAllowedInstallBundles(admin: Want, userId: number, callback: AsyncCallback<Array<string>>): void; -Obtains the list of bundles that are allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the applications that can be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -369,7 +370,7 @@ Obtains the list of bundles that are allowed to be installed by the given user ( | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** @@ -402,7 +403,7 @@ bundleManager.getAllowedInstallBundles(wantTemp, 100, (err, result) => { getAllowedInstallBundles(admin: Want, userId?: number): Promise<Array<string>>; -Obtains the list of bundles that are allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. +Obtains the applications that can be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -415,7 +416,7 @@ Obtains the list of bundles that are allowed to be installed by the current user | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications can be installed by the specified user.
- If **userId** is not passed in, the applications can be installed by the current user.| **Return value** @@ -451,7 +452,7 @@ bundleManager.getAllowedInstallBundles(wantTemp, 100).then((result) => { addDisallowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -Adds a list of bundles that are not allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Adds the applications that cannot be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -464,7 +465,7 @@ Adds a list of bundles that are not allowed to be installed by the current user | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | +| appIds | Array<string> | Yes | IDs of the applications to add. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -498,7 +499,7 @@ bundleManager.addDisallowedInstallBundles(wantTemp, appIds, (err) => { addDisallowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; -Adds a list of bundles that are not allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result. +Adds the applications that cannot be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -511,8 +512,8 @@ Adds a list of bundles that are not allowed to be installed by the given user (s | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to add. | +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -546,7 +547,7 @@ bundleManager.addDisallowedInstallBundles(wantTemp, appIds, 100, (err) => { addDisallowedInstallBundles(admin: Want, appIds: Array\, userId?: number): Promise<void>; -Adds a list of bundles that are not allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. +Adds the applications that cannot be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -559,14 +560,14 @@ Adds a list of bundles that are not allowed to be installed by the current user | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to add. | +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be installed by the specified user.
- If **userId** is not passed in, the applications cannot be installed by the current user.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. If the operation fails, an error object is thrown. | +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown. | **Error codes** @@ -597,7 +598,7 @@ bundleManager.addDisallowedInstallBundles(wantTemp, appIds, 100).then(() => { removeDisallowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -Removes a list of bundles that are not allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Removes the applications that cannot be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -610,7 +611,7 @@ Removes a list of bundles that are not allowed to be installed by the current us | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be removed. | +| appIds | Array<string> | Yes | IDs of the applications to remove. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -642,9 +643,9 @@ bundleManager.removeDisallowedInstallBundles(wantTemp, appIds, (err) => { ## bundleManager.removeDisallowedInstallBundles -removeAllowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; +removeDisallowedInstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; -Removes a list of bundles that are not allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result. +Removes the applications that cannot be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -657,8 +658,8 @@ Removes a list of bundles that are not allowed to be installed by the given user | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to remove. | +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -692,7 +693,7 @@ bundleManager.removeDisallowedInstallBundles(wantTemp, appIds, 100, (err) => { removeDisallowedInstallBundles(admin: Want, appIds: Array\, userId?: number): Promise<void>; -Removes a list of bundles that are not allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. +Removes the applications that cannot be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -705,14 +706,14 @@ Removes a list of bundles that are not allowed to be installed by the current us | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array\<string> | Yes | Bundles to be removed. | -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array\<string> | Yes | IDs of the applications to remove. | +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be installed by the specified user.
- If **userId** is not passed in, the applications cannot be installed by the current user.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. If the operation fails, an error object is thrown. | +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown. | **Error codes** @@ -743,7 +744,7 @@ bundleManager.removeDisallowedInstallBundles(wantTemp, appIds, 100).then(() => { getDisallowedInstallBundles(admin: Want, callback: AsyncCallback<Array<string>>): void; -Obtains the list of bundles that are not allowed to be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the applications that cannot be installed by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -788,7 +789,7 @@ bundleManager.getDisallowedInstallBundles(wantTemp, (err, result) => { getDisallowedInstallBundles(admin: Want, userId: number, callback: AsyncCallback<Array<string>>): void; -Obtains the list of bundles that are not allowed to be installed by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the applications that cannot be installed by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -801,7 +802,7 @@ Obtains the list of bundles that are not allowed to be installed by the given us | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** @@ -834,7 +835,7 @@ bundleManager.getDisallowedInstallBundles(wantTemp, 100, (err, result) => { getDisallowedInstallBundles(admin: Want, userId?: number): Promise<Array<string>>; -Obtains the list of bundles that are not allowed to be installed by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. +Obtains the applications that cannot be installed by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -847,7 +848,7 @@ Obtains the list of bundles that are not allowed to be installed by the current | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be installed by the specified user.
- If **userId** is not passed in, the applications cannot be installed by the current user.| **Return value** @@ -883,7 +884,7 @@ bundleManager.getDisallowedInstallBundles(wantTemp, 100).then((result) => { addDisallowedUninstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void -Adds a list of bundles that are not allowed to be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Adds the applications that cannot be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -896,7 +897,7 @@ Adds a list of bundles that are not allowed to be uninstalled by the current use | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | +| appIds | Array<string> | Yes | IDs of the applications to add. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -930,7 +931,7 @@ bundleManager.addDisallowedUninstallBundles(wantTemp, appIds, (err) => { addDisallowedUninstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void -Adds a list of bundles that are not allowed to be uninstalled by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result. +Adds the applications that cannot be uninstalled by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -943,8 +944,8 @@ Adds a list of bundles that are not allowed to be uninstalled by the given user | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to add. | +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -978,7 +979,7 @@ bundleManager.addDisallowedUninstallBundles(wantTemp, appIds, 100, (err) => { addDisallowedUninstallBundles(admin: Want, appIds: Array\, userId?: number): Promise<void> -Adds a list of bundles that are not allowed to be uninstalled by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. +Adds the applications that cannot be uninstalled by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -991,14 +992,14 @@ Adds a list of bundles that are not allowed to be uninstalled by the current use | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to add. | +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be uninstalled by the specified user.
- If **userId** is not passed in, the applications cannot be uninstalled by the current user.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. If the operation fails, an error object is thrown. | +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown. | **Error codes** @@ -1029,7 +1030,7 @@ bundleManager.addDisallowedUninstallBundles(wantTemp, appIds, 100).then(() => { removeDisallowedUninstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void -Removes a list of bundles that are not allowed to be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Removes the applications that cannot be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -1042,7 +1043,7 @@ Removes a list of bundles that are not allowed to be uninstalled by the current | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be added. | +| appIds | Array<string> | Yes | IDs of the applications to remove. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -1076,7 +1077,7 @@ bundleManager.removeDisallowedUninstallBundles(wantTemp, appIds, (err) => { removeDisallowedUninstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void -Removes a list of bundles that are not allowed to be uninstalled by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result. +Removes the applications that cannot be uninstalled by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -1089,8 +1090,8 @@ Removes a list of bundles that are not allowed to be uninstalled by the given us | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array<string> | Yes | Bundles to be removed. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array<string> | Yes | IDs of the applications to remove. | +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -1124,7 +1125,7 @@ bundleManager.removeDisallowedUninstallBundles(wantTemp, appIds, 100, (err) => { removeDisallowedUninstallBundles(admin: Want, appIds: Array\, userId?: number): Promise<void> -Removes a list of bundles that are not allowed to be uninstalled by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. +Removes the applications that cannot be uninstalled by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -1137,14 +1138,14 @@ Removes a list of bundles that are not allowed to be uninstalled by the current | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| appIds | Array\<string> | Yes | Bundles to be removed. | -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| appIds | Array\<string> | Yes | IDs of the applications to remove. | +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be uninstalled by the specified user.
- If **userId** is not passed in, the applications cannot be uninstalled by the current user.| **Return value** | Type | Description | | --------------------- | ------------------------- | -| Promise<void> | Promise that returns no value. If the operation fails, an error object is thrown. | +| Promise<void> | Promise that returns no value. If the operation fails, an error object will be thrown. | **Error codes** @@ -1175,7 +1176,7 @@ bundleManager.removeDisallowedUninstallBundles(wantTemp, appIds, 100).then(() => getDisallowedUninstallBundles(admin: Want, callback: AsyncCallback<Array<string>>): void -Obtains the list of bundles that are not allowed to be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the applications that cannot be uninstalled by the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -1220,7 +1221,7 @@ bundleManager.getDisallowedUninstallBundles(wantTemp, (err, result) => { getDisallowedUninstallBundles(admin: Want, userId: number, callback: AsyncCallback<Array<string>>): void -Obtains the list of bundles that are not allowed to be uninstalled by the given user (specified by **userId**) through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the applications that cannot be uninstalled by the specified user through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -1233,7 +1234,7 @@ Obtains the list of bundles that are not allowed to be uninstalled by the given | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<Array<string>> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** @@ -1266,7 +1267,7 @@ bundleManager.getDisallowedUninstallBundles(wantTemp, 100, (err, result) => { getDisallowedUninstallBundles(admin: Want, userId?: number): Promise<Array<string>> -Obtains the list of bundles that are not allowed to be uninstalled by the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. +Obtains the applications that cannot be uninstalled by the current or specified user through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -1279,7 +1280,7 @@ Obtains the list of bundles that are not allowed to be uninstalled by the curren | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the applications cannot be uninstalled by the specified user.
- If **userId** is not passed in, the applications cannot be uninstalled by the current user.| **Return value** @@ -1315,7 +1316,7 @@ bundleManager.getDisallowedUninstallBundles(wantTemp, 100).then((result) => { uninstall(admin: Want, bundleName: string, callback: AsyncCallback<void>): void -Uninstalls the given bundle of the current user without retaining the bundle data through the specified device administrator application. This API uses an asynchronous callback to return the result. +Uninstalls an application of the current user without retaining the bundle data through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_INSTALL_BUNDLE @@ -1328,7 +1329,7 @@ Uninstalls the given bundle of the current user without retaining the bundle dat | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| bundleName | string | Yes | Bundle name.| +| bundleName | string | Yes | Name of the bundle to uninstall.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** @@ -1360,7 +1361,7 @@ bundleManager.uninstall(wantTemp, 'bundleName', (err) => { uninstall(admin: Want, bundleName: string, userId: number, callback: AsyncCallback<void>): void -Uninstalls the given bundle of the user specified by **userId** without retaining the bundle data through the specified device administrator application. This API uses an asynchronous callback to return the result. +Uninstalls an application of the specified user without retaining the bundle data through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_INSTALL_BUNDLE @@ -1373,8 +1374,8 @@ Uninstalls the given bundle of the user specified by **userId** without retainin | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| bundleName | string | Yes | Bundle name.| -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| bundleName | string | Yes | Name of the bundle to uninstall.| +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** @@ -1406,7 +1407,7 @@ bundleManager.uninstall(wantTemp, 'bundleName', 100, (err) => { uninstall(admin: Want, bundleName: string, isKeepData: boolean, callback: AsyncCallback<void>): void -Uninstalls the given bundle of the current user through the specified device administrator application. This API uses an asynchronous callback to return the result. If **isKeepData** is **false**, the bundle data is not retained. +Uninstalls an application of the current user through the specified device administrator application. The **isKeepData** parameter specifies whether to retain the bundle data. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_INSTALL_BUNDLE @@ -1419,7 +1420,7 @@ Uninstalls the given bundle of the current user through the specified device adm | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| bundleName | string | Yes | Bundle name.| +| bundleName | string | Yes | Name of the bundle to uninstall.| | isKeepData | boolean | Yes | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | @@ -1452,7 +1453,7 @@ bundleManager.uninstall(wantTemp, 'bundleName', true, (err) => { uninstall(admin: Want, bundleName: string, userId: number, isKeepData: boolean, callback: AsyncCallback<void>): void -Uninstalls the given bundle of the user specified by **userId** through the specified device administrator application. This API uses an asynchronous callback to return the result. If **isKeepData** is **false**, the bundle data is not retained. +Uninstalls an application of the specified user through the specified device administrator application. The **isKeepData** parameter specifies whether to retain the bundle data. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_INSTALL_BUNDLE @@ -1465,8 +1466,8 @@ Uninstalls the given bundle of the user specified by **userId** through the spec | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| bundleName | string | Yes | Bundle name.| -| userId | number | Yes | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| bundleName | string | Yes | Name of the bundle to uninstall.| +| userId | number | Yes | User ID, which must be greater than or equal to 0.| | isKeepData | boolean | Yes | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.| | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | @@ -1499,7 +1500,7 @@ bundleManager.uninstall(wantTemp, 'bundleName', 100, true, (err) => { uninstall(admin: Want, bundleName: string, userId?: number, isKeepData?: boolean): Promise<void> -Uninstalls the given bundle of the current user (if **userId** is not passed in) or the given user (if **userId** is passed in) through the specified device administrator application. This API uses a promise to return the result. If **isKeepData** is not passed in, the default value **false** is used, which means the bundle data will not be retained. +Uninstalls an application of the current or specified user through the specified device administrator application. The **isKeepData** parameter specifies whether to retain the bundle data. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_INSTALL_BUNDLE @@ -1512,8 +1513,8 @@ Uninstalls the given bundle of the current user (if **userId** is not passed in) | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| bundleName | string | Yes | Bundle name.| -| userId | number | No | User ID. The default value is the user ID of the caller. The user ID must be greater than or equal to **0**.| +| bundleName | string | Yes | Name of the bundle to uninstall.| +| userId | number | No | User ID, which must be greater than or equal to 0.
- If **userId** is passed in, the application of the specified user is uninstalled.
- If **userId** is not passed in, the application of the current user is uninstalled.| | isKeepData | boolean | No | Whether to retain the bundle data. The value **true** means to retain the bundle data; the value **false** means the opposite.| **Return value** diff --git a/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md b/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md index 68d3434970c426586a344a76d16bc3516a26f628..667455669f3e1049050f16c2bddadbb3089ec3df 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md @@ -6,6 +6,8 @@ The **dateTimeManager** module provides APIs for system time management. > > - The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. > +> - The APIs of this module can be used only in the stage model. +> > - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin). ## Modules to Import @@ -113,7 +115,7 @@ dateTimeManager.setDateTime(wantTemp, 1526003846000).then(() => { disallowModifyDateTime(admin: Want, disallow: boolean, callback: AsyncCallback\): void -Disallows modification of the system time through the specified device administrator application. This API uses an asynchronous callback to return the result. +Forbids the specified device administrator application to modify the system time. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME @@ -126,7 +128,7 @@ Disallows modification of the system time through the specified device administr | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| disallow | boolean | Yes| Whether to disable modification of the system time. The value **true** means to disable modification of the system time, and **false** means the opposite.| +| disallow | boolean | Yes| Whether to disallow modification of the system time. The value **true** means to disallow modification of the system time, and **false** means the opposite.| | callback | AsyncCallback\ | Yes| Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -159,7 +161,7 @@ dateTimeManager.disallowModifyDateTime(wantTemp, true, (err) => { disallowModifyDateTime(admin: Want, disallow: boolean): Promise\ -Disallows modification of the system time through the specified device administrator application. This API uses a promise to return the result. +Forbids the specified device administrator application to modify the system time. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME @@ -172,13 +174,13 @@ Disallows modification of the system time through the specified device administr | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| disallow | boolean | Yes| Whether to disable modification of the system time. The value **true** means to disable modification of the system time, and **false** means the opposite.| +| disallow | boolean | Yes| Whether to disallow modification of the system time. The value **true** means to disallow modification of the system time, and **false** means the opposite.| **Return value** | Type | Description | | ----- | ----------------------------------- | -| Promise\ | Promise that returns no value. An error object is thrown if the operation fails.| +| Promise\ | Promise that returns no value. If the operation fails, an error object will be thrown.| **Error codes** @@ -208,7 +210,7 @@ dateTimeManager.disallowModifyDateTime(wantTemp, true).then(() => { isModifyDateTimeDisallowed(admin: Want, callback: AsyncCallback\): void -Checks whether the modification of the system time is disallowed through the specified device administrator application. This API uses an asynchronous callback to return the result. +Checks whether the system time modification is disallowed through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME @@ -221,7 +223,7 @@ Checks whether the modification of the system time is disallowed through the spe | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| callback | AsyncCallback\ | Yes| Callback invoked to return the result. The value **true** means that modification of the system time is disallowed, and **false** means the opposite.| +| callback | AsyncCallback\ | Yes| Callback invoked to return the result. The value **true** means the system time modification is disallowed, and **false** means the opposite.| **Error codes** @@ -253,7 +255,7 @@ dateTimeManager.isModifyDateTimeDisallowed(wantTemp, (err, result) => { isModifyDateTimeDisallowed(admin: Want): Promise\ -Checks whether the modification of the system time is disallowed through the specified device administrator application. This API uses a promise to return the result. +Checks whether the system time modification is disallowed through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_DATETIME @@ -271,7 +273,7 @@ Checks whether the modification of the system time is disallowed through the spe | Type | Description | | ----- | ----------------------------------- | -| Promise\ | Promise used to return the result. The value **true** means that modification of the system time is disallowed, and **false** means the opposite.| +| Promise\ | Promise used to return the result. The value **true** means the system time modification is disallowed, and **false** means the opposite.| **Error codes** diff --git a/en/application-dev/reference/apis/js-apis-enterprise-deviceControl.md b/en/application-dev/reference/apis/js-apis-enterprise-deviceControl.md index 86b7381381b5710e4b4acc046e545f37b10e1c96..9bae24e33a64d1539300474cdc9839ea1fe22cc9 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-deviceControl.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-deviceControl.md @@ -1,11 +1,12 @@ # @ohos.enterprise.deviceControl (Device Control) -The **deviceControl** module provides APIs for device control, which can be called only by device administrator applications. +The **deviceControl** module provides APIs for device control. > **NOTE** -> +> > - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. > +> - The APIs of this module can be used only in the stage model. > > - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin). @@ -19,7 +20,7 @@ import deviceControl from '@ohos.enterprise.deviceControl' resetFactory(admin: Want, callback: AsyncCallback\): void -Restores factory settings through the specified device administrator application. This API uses an asynchronous callback to return the result. +Restores device factory settings through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_RESET_DEVICE @@ -31,7 +32,7 @@ Restores factory settings through the specified device administrator application | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application used to restore the factory settings.| +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| | callback | AsyncCallback\ | Yes| Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| **Error codes** @@ -64,7 +65,7 @@ deviceControl.resetFactory(wantTemp, (err) => { resetFactory(admin: Want): Promise\ -Restores factory settings. This API uses a promise to return the result. +Restores device factory settings through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_RESET_DEVICE @@ -76,7 +77,7 @@ Restores factory settings. This API uses a promise to return the result. | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application used to restore the factory settings.| +| admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| **Return value** diff --git a/en/application-dev/reference/apis/js-apis-enterprise-deviceInfo.md b/en/application-dev/reference/apis/js-apis-enterprise-deviceInfo.md index e859dd3af41f7cb97e7a204b80b2d0d98f4af9c3..c642ae6a5aaef9fc0d06356ce1f61850dc4ef74e 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-deviceInfo.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-deviceInfo.md @@ -6,6 +6,8 @@ The **deviceInfo** module provides APIs for enterprise device information manage > > - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. > +> - The APIs of this module can be used only in the stage model. +> > - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin). ## Modules to Import @@ -111,7 +113,7 @@ deviceInfo.getDeviceSerial(wantTemp).then((result) => { getDisplayVersion(admin: Want, callback: AsyncCallback<string>): void; -Obtains the device version number through the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the device version through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_DEVICE_INFO @@ -124,7 +126,7 @@ Obtains the device version number through the specified device administrator app | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| callback | AsyncCallback<string> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the device version number obtained. If the operation fails, **err** is an error object. | +| callback | AsyncCallback<string> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the device version obtained. If the operation fails, **err** is an error object. | **Error codes** @@ -156,7 +158,7 @@ deviceInfo.getDisplayVersion(wantTemp, (err, result) => { getDisplayVersion(admin: Want): Promise<string> -Obtains the device version number through the specified device administrator application. This API uses a promise to return the result. +Obtains the device version through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_DEVICE_INFO @@ -174,7 +176,7 @@ Obtains the device version number through the specified device administrator app | Type | Description | | --------------------- | ------------------------- | -| Promise<string> | Promise used to return the device version number.| +| Promise<string> | Promise used to return the device version obtained.| **Error codes** diff --git a/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md b/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md index 3d57b7d8be42df4e4b560b36885c7eccf885bbe7..3eb33e1c80e10cbffe5ff33ce2cd6f1d44de2097 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md @@ -4,9 +4,11 @@ The **wifiManager** module provides APIs for Wi-Fi management of enterprise devi > **NOTE** > -> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. > -> The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin). +> - The APIs of this module can be used only in the stage model. +> +> - The APIs provided by this module can be called only by a [device administrator application](enterpriseDeviceManagement-overview.md#basic-concepts) that is [enabled](js-apis-enterprise-adminManager.md#adminmanagerenableadmin). ## Modules to Import @@ -37,7 +39,7 @@ Checks whether Wi-Fi is active through the specified device administrator applic For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | the application is not an administrator of the device. | | 9200002 | the administrator application does not have permission to manage the device. | @@ -87,7 +89,7 @@ Checks whether Wi-Fi is active through the specified device administrator applic For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | the application is not an administrator of the device. | | 9200002 | the administrator application does not have permission to manage the device. | @@ -111,7 +113,7 @@ wifiManager.isWifiActive(wantTemp).then((result) => { setWifiProfile(admin: Want, profile: WifiProfile, callback: AsyncCallback<void>): void -Sets Wi-Fi to connect to the specified network. This API uses an asynchronous callback to return the result. +Sets Wi-Fi profile through the specified device administrator application to enable the device to connect to the specified network. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_WIFI @@ -124,14 +126,14 @@ Sets Wi-Fi to connect to the specified network. This API uses an asynchronous ca | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| profile | [WifiProfile](#wifiprofile) | Yes | WLAN configuration. | +| profile | [WifiProfile](#wifiprofile) | Yes | Wi-Fi profile information. | | callback | AsyncCallback<void> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | **Error codes** For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | the application is not an administrator of the device. | | 9200002 | the administrator application does not have permission to manage the device. | @@ -162,7 +164,7 @@ wifiManager.setWifiProfile(wantTemp, profile, (err) => { setWifiProfile(admin: Want, profile: WifiProfile): Promise<void> -Sets Wi-Fi to connect to the specified network. This API uses a promise to return the result. +Sets Wi-Fi profile through the specified device administrator application to enable the device to connect to the specified network. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_WIFI @@ -175,7 +177,7 @@ Sets Wi-Fi to connect to the specified network. This API uses a promise to retur | Name | Type | Mandatory | Description | | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| -| profile | [WifiProfile](#wifiprofile) | Yes | WLAN configuration. | +| profile | [WifiProfile](#wifiprofile) | Yes | Wi-Fi profile information. | **Return value** @@ -187,7 +189,7 @@ Sets Wi-Fi to connect to the specified network. This API uses a promise to retur For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md). -| ID| Error Message | +| ID| Error Message | | ------- | ---------------------------------------------------------------------------- | | 9200001 | the application is not an administrator of the device. | | 9200002 | the administrator application does not have permission to manage the device. | @@ -214,7 +216,7 @@ wifiManager.setWifiProfile(wantTemp, profile).then(() => { ## WifiProfile -Represents the WLAN configuration. +Represents the Wi-Fi profile information. **System capability**: SystemCapability.Customization.EnterpriseDeviceManager