From 8197a8e2c2b1e11b70513787fc9b1bbb4c29fed5 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Mon, 12 Jun 2023 14:18:58 +0800 Subject: [PATCH] update docs Signed-off-by: Annie_wang --- .../apis/js-apis-enterprise-accountManager.md | 8 +- .../apis/js-apis-enterprise-adminManager.md | 84 +++++++++---------- .../js-apis-enterprise-applicationManager.md | 20 ++--- .../apis/js-apis-enterprise-bundleManager.md | 4 +- .../js-apis-enterprise-dateTimeManager.md | 6 +- .../apis/js-apis-enterprise-deviceControl.md | 6 +- .../apis/js-apis-enterprise-deviceInfo.md | 18 ++-- .../apis/js-apis-enterprise-networkManager.md | 40 ++++----- .../apis/js-apis-enterprise-wifiManager.md | 12 +-- 9 files changed, 99 insertions(+), 99 deletions(-) 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 f01001773d..9fb44e3c6a 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-accountManager.md @@ -4,8 +4,8 @@ The **accountManager** module provides APIs for account management of enterprise > **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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. +> - 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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. ## Modules to Import @@ -37,7 +37,7 @@ Forbids a device administrator application to create local user accounts. This A 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -85,7 +85,7 @@ Forbids a device administrator application to create local user accounts. This A 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| diff --git a/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md b/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md index 330a4de4c1..6ce6b0456e 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-adminManager.md @@ -31,7 +31,7 @@ Enables a device administrator application of the current user. This API uses an | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. | | type | [AdminType](#admintype) | Yes | Type of the device administrator to enable. | -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| +| 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** @@ -82,8 +82,8 @@ Enables a device administrator application of the user specified by **userId**. | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. | | type | [AdminType](#admintype) | Yes | Type of the device administrator to enable. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.| -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | +| 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**.| +| 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** @@ -119,7 +119,7 @@ adminManager.enableAdmin(wantTemp, enterpriseInfo, adminManager.AdminType.ADMIN_ enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise\ -Enables a device administrator application of the user specified by **userId** (if any) or the current user. This API uses a promise to return the result. The super administrator application can be enabled only by the administrator. +Enables a device administrator application of the specified user (if **userId** is passed in) or the current user (if **userId** is not passed in). This API uses a promise to return the result. The super administrator application can be enabled only by the administrator. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -134,7 +134,7 @@ Enables a device administrator application of the user specified by **userId** ( | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. | | type | [AdminType](#admintype) | Yes | Type of the device administrator to enable. | -| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.| +| 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**.| **Return value** @@ -173,7 +173,7 @@ adminManager.enableAdmin(wantTemp, enterpriseInfo, adminManager.AdminType.ADMIN_ disableAdmin(admin: Want, callback: AsyncCallback\): void -Disables a device common administrator application of the current user. This API uses an asynchronous callback to return the result. +Disables a device administrator application of the current user. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -185,8 +185,8 @@ Disables a device common administrator application of the current user. This API | Name | Type | Mandatory | Description | | -------- | ----------------------------------- | ---- | ------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device common administrator application. | -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| +| 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** @@ -216,7 +216,7 @@ adminManager.disableAdmin(wantTemp, error => { disableAdmin(admin: Want, userId: number, callback: AsyncCallback\): void -Disables a device common administrator application of the user specified by **userId**. This API uses an asynchronous callback to return the result. +Disables a device administrator application of the user specified by **userId**. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -228,9 +228,9 @@ Disables a device common administrator application of the user specified by **us | Name | Type | Mandatory | Description | | -------- | ----------------------------------- | ---- | ---------------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device common administrator application. | -| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.| -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. | +| 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**.| +| 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** @@ -260,7 +260,7 @@ adminManager.disableAdmin(wantTemp, 100, error => { disableAdmin(admin: Want, userId?: number): Promise\ -Disables a device administrator application of the user specified by **userId** (if any) or the current user. This API uses a promise to return the result. +Disables a device administrator application of the specified user (if **userId** is passed in) or the current user (if **userId** is not passed in). This API uses a promise to return the result. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -272,8 +272,8 @@ Disables a device administrator application of the user specified by **userId** | Name | Type | Mandatory | Description | | ------ | ----------------------------------- | ---- | ---------------------------- | -| admin | [Want](js-apis-app-ability-want.md) | Yes | Device common administrator application. | -| userId | number | No | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.| +| 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**.| **Return value** @@ -305,7 +305,7 @@ adminManager.disableAdmin(wantTemp, 100).catch(error => { disableSuperAdmin(bundleName: String, callback: AsyncCallback\): void -Disables a device super administrator application based on the specified bundle name. This API uses an asynchronous callback to return the result. +Disables a super device administrator application based on the specified bundle name. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -317,8 +317,8 @@ Disables a device super administrator application based on the specified bundle | Name | Type | Mandatory | Description | | ---------- | ----------------------- | ---- | ------------------- | -| bundleName | String | Yes | Bundle name of the device super administrator application. | -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| +| bundleName | String | Yes | Bundle name of the super 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** @@ -345,7 +345,7 @@ adminManager.disableSuperAdmin(bundleName, error => { disableSuperAdmin(bundleName: String): Promise\ -Disables a device super administrator application based on the specified bundle name. This API uses a promise to return the result. +Disables a super device administrator application based on the specified bundle name. This API uses a promise to return the result. **Required permissions**: ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN @@ -357,7 +357,7 @@ Disables a device super administrator application based on the specified bundle | Name | Type | Mandatory | Description | | ---------- | ------ | ---- | ------------ | -| bundleName | String | Yes | Bundle name of the device super administrator application.| +| bundleName | String | Yes | Bundle name of the super device administrator application.| **Return value** @@ -397,7 +397,7 @@ Checks whether a device administrator application of the current user is enabled | Name | Type | Mandatory | Description | | -------- | ----------------------------------- | ---- | -------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object.| +| callback | AsyncCallback\ | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object.| **Example** @@ -430,8 +430,8 @@ Checks whether a device administrator application of the user specified by **use | 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 value must be greater than or equal to 0.| -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object. | +| 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**.| +| callback | AsyncCallback\ | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object. | **Example** @@ -453,7 +453,7 @@ adminManager.isAdminEnabled(wantTemp, 100, (error, result) => { isAdminEnabled(admin: Want, userId?: number): Promise\ -Checks whether a device administrator application of the user specified by **userId** (if any) or the current user is enabled. This API uses a promise to return the result. +Checks whether a device administrator application of the specified user (if **userId** is passed in) or the current user (if **userId** is not passed in) is enabled. This API uses a promise to return the result. **System capability**: SystemCapability.Customization.EnterpriseDeviceManager @@ -464,7 +464,7 @@ Checks whether a device administrator application of the user specified by **use | 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 value must be greater than or equal to 0.| +| 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**.| **Return value** @@ -490,7 +490,7 @@ adminManager.isAdminEnabled(wantTemp, 100).then((result) => { isSuperAdmin(bundleName: String, callback: AsyncCallback\): void -Checks whether a device super administrator application is enabled based on the specified bundle name. This API uses an asynchronous callback to return the result. +Checks whether a super device administrator application is enabled based on the specified bundle name. This API uses an asynchronous callback to return the result. **System capability**: SystemCapability.Customization.EnterpriseDeviceManager @@ -501,7 +501,7 @@ Checks whether a device super administrator application is enabled based on the | Name | Type | Mandatory | Description | | ---------- | ----------------------- | ---- | -------------------- | | bundleName | String | Yes | Device administrator application. | -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object.| +| callback | AsyncCallback\ | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is a Boolean value (**true** means that the super device administrator application is enabled; and **false** means the opposite). If the operation fails, **err** is an error object.| **Example** @@ -520,7 +520,7 @@ adminManager.isSuperAdmin(bundleName, (error, result) => { isSuperAdmin(bundleName: String): Promise\ -Checks whether a device super administrator application is enabled based on the specified bundle name. This API uses a promise to return the result. +Checks whether a super device administrator application is enabled based on the specified bundle name. This API uses a promise to return the result. **System capability**: SystemCapability.Customization.EnterpriseDeviceManager @@ -530,13 +530,13 @@ Checks whether a device super administrator application is enabled based on the | Name | Type | Mandatory | Description | | ---------- | ------ | ---- | --------- | -| bundleName | String | Yes | Device super administrator application.| +| bundleName | String | Yes | Super device administrator application.| **Return value** | ID | Error Message | | ----------------- | ------------------- | -| Promise\ | Promise used to return the result. If **true** is returned, the device super administrator application is enabled. If **false** is returned, the device super administrator application is not enabled.| +| Promise\ | Promise used to return the result. If **true** is returned, the super device administrator application is enabled. If **false** is returned, the super device administrator application is not enabled.| **Example** @@ -567,7 +567,7 @@ Sets the enterprise information of a device administrator application. This API | -------------- | ----------------------------------- | ---- | ---------------------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | | enterpriseInfo | [EnterpriseInfo](#enterpriseinfo) | Yes | Enterprise information of the device administrator application. | -| callback | AsyncCallback\; | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| +| 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** @@ -661,7 +661,7 @@ Obtains the enterprise information of a device administrator application. This A | Name | Type | Mandatory | Description | | -------- | ---------------------------------------- | ---- | ------------------------ | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application. | -| callback | AsyncCallback<[EnterpriseInfo](#enterpriseinfo)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the enterprise information of the device administrator application. If the operation fails, **err** is an error object.| +| callback | AsyncCallback<[EnterpriseInfo](#enterpriseinfo)> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **null** and **data** is the enterprise information of the device administrator application obtained. If the operation fails, **err** is an error object.| **Error codes** @@ -708,7 +708,7 @@ Obtains the enterprise information of a device administrator application. This A | Type | Description | | ---------------------------------------- | ------------------------- | -| Promise<[EnterpriseInfo](#enterpriseinfo)> | Callback used to return the enterprise information of the device administrator application.| +| Promise<[EnterpriseInfo](#enterpriseinfo)> | Promise used to return the enterprise information of the specified device administrator application obtained.| **Error codes** @@ -737,7 +737,7 @@ adminManager.getEnterpriseInfo(wantTemp).then((result) => { subscribeManagedEvent(admin: Want, managedEvents: Array\, callback: AsyncCallback\): void -Configures a device administrator application to subscribe to system management events. This API uses an asynchronous callback to return the result. +Subscribes to system management events through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT @@ -751,7 +751,7 @@ Configures a device administrator application to subscribe to system management | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| | managedEvents | Array\<[ManagedEvent](#managedevent)> | Yes| Array of events to subscribe to.| -| callback | AsyncCallback\ | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| +| 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** @@ -781,7 +781,7 @@ adminManager.subscribeManagedEvent(wantTemp, events, (error) => { subscribeManagedEvent(admin: Want, managedEvents: Array\): Promise\ -Configures a device administrator application to subscribe to system management events. This API uses a promise to return the result. +Subscribes to system management events through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT @@ -829,7 +829,7 @@ adminManager.subscribeManagedEvent(wantTemp, events).then(() => { unsubscribeManagedEvent(admin: Want, managedEvents: Array\, callback: AsyncCallback\): void -Configures a device administrator application to unsubscribe from system management events. This API uses an asynchronous callback to return the result. +Unsubscribes from system management events through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT @@ -843,7 +843,7 @@ Configures a device administrator application to unsubscribe from system managem | ----- | ----------------------------------- | ---- | ------- | | admin | [Want](js-apis-app-ability-want.md) | Yes | Device administrator application.| | managedEvents | Array\<[ManagedEvent](#managedevent)> | Yes| Array of events to unsubscribe from.| -| callback | AsyncCallback\ | Yes| Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.| +| 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** @@ -873,7 +873,7 @@ adminManager.unsubscribeManagedEvent(wantTemp, events, (error) => { unsubscribeManagedEvent(admin: Want, managedEvents: Array\): Promise\ -Configures a device administrator application to unsubscribe from system management events. This API uses a promise to return the result. +Unsubscribes from system management events through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT @@ -919,7 +919,7 @@ adminManager.unsubscribeManagedEvent(wantTemp, events).then(() => { ## EnterpriseInfo -Describes the enterprise information of a device administrator application. +Defines the enterprise information of a device administrator application. **System capability**: SystemCapability.Customization.EnterpriseDeviceManager @@ -953,7 +953,7 @@ Enumerates the system management events that can be subscribed to. | Name | Value | Description | | -------------------------- | ---- | ------------- | -| MANAGED_EVENT_BUNDLE_ADDED | 0 | Bundle added.| -| MANAGED_EVENT_BUNDLE_REMOVED | 1 | Bundle removed.| +| MANAGED_EVENT_BUNDLE_ADDED | 0 | Application installed.| +| MANAGED_EVENT_BUNDLE_REMOVED | 1 | Application uninstalled.| | MANAGED_EVENT_APP_START10+ | 2 | Application started.| | MANAGED_EVENT_APP_STOP10+ | 3 | Application stopped.| 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 482c93e907..529777b2e1 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-applicationManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-applicationManager.md @@ -1,6 +1,6 @@ # @ohos.enterprise.applicationManager (Application Management) -The **applicationManager** module provides application management capabilities, including adding applications to or removing applications from an application blocklist, and obtaining the application blocklist. The application blocklist contains the applications that are forbidden to run. Only the enterprise device administrator applications can call the APIs provided by this module. +The **applicationManager** module provides application management capabilities, including adding, removing, and obtaining the applications that are forbidden to run. Only the enterprise device administrator applications can call the APIs provided by this module. > **NOTE** > @@ -17,7 +17,7 @@ import applicationManager from '@ohos.enterprise.applicationManager'; addDisallowedRunningBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -Adds applications to the application blocklist using the specified device administrator application. This API uses an asynchronous callback to return the result. The applications added to the blocklist cannot run under the current user. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -63,7 +63,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, (error) => { addDisallowedRunningBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; -Adds applications to the application list for a user using the specified device administrator application. This API uses an asynchronous callback to return the result. The applications added to the blocklist cannot run under the user specified by **userId**. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -109,7 +109,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, 100, (error) => addDisallowedRunningBundles(admin: Want, appIds: Array\, userId?: number): Promise<void>; -Adds applications to the application blocklist using the specified device administrator application. This API uses a promise to return the result. If **userId** is passed in when this API is called, the added applications cannot run under the specified user. If **userId** is not passed in, the added applications cannot run under the current user. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -160,7 +160,7 @@ applicationManager.addDisallowedRunningBundles(wantTemp, appIds, 100).then(() => removeDisallowedRunningBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -Removes applications from the application blocklist using the specified device administrator application. This API uses an asynchronous callback to return the result. If an application blocklist exists, the applications in the blocklist cannot run under the current user. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -205,7 +205,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, (error) => { removeDisallowedRunningBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void; -Removes applications from the application blocklist of a user using the specified device administrator application. This API uses an asynchronous callback to return the result. If an application blocklist exists, the applications in the blocklist cannot run under the user specified by **userId**. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -251,7 +251,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, 100, (error) removeDisallowedRunningBundles(admin: Want, appIds: Array\, userId?: number): Promise<void>; -Removes applications from the application blocklist using the specified device administrator application. This API uses a promise to return the result. If **userId** is passed in when this API is called to remove applications from the blocklist, the applications in the blocklist cannot run under the specified user. If **userId** is not passed in, the applications in the blocklist cannot run under the current user. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -302,7 +302,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, 100).then(() getDisallowedRunningBundles(admin: Want, callback: AsyncCallback<Array<string>>): void; -Obtains the application blocklist of the current user using the specified device administrator application. This API uses an asynchronous callback to return the result. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -345,7 +345,7 @@ applicationManager.getDisallowedRunningBundles(wantTemp, (error) => { getDisallowedRunningBundles(admin: Want, userId: number, callback: AsyncCallback<Array<string>>): void; -Obtains the application blocklist of a user using the specified device administrator application. This API uses an asynchronous callback to return the result. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -389,7 +389,7 @@ applicationManager.getDisallowedRunningBundles(wantTemp, 100, (error) => { getDisallowedRunningBundles(admin: Want, userId?: number): Promise<Array<string>>; -Obtains the application blocklist of the current user using the specified device administrator application. This API uses a promise to return the result. If **userId** is passed in, the application blocklist of the specified user is obtained. If **userId** is not passed in, the application blocklist of the current user is obtained. +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. **Required permissions**: ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY 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 e7452f706a..0fe49e5a2a 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-bundleManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-bundleManager.md @@ -4,8 +4,8 @@ The **bundleManager** module provides APIs for bundle management, including addi > **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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. +> - 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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. ## Modules to Import 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 61ae36ddc3..f6f44a72f0 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-dateTimeManager.md @@ -1,11 +1,11 @@ # @ohos.enterprise.dateTimeManager (System Time Management) -The dateTimeManager module provides APIs for system time management. Only the enterprise device administrator applications can call the APIs provided by this module. +The **dateTimeManager** module provides APIs for system time management. Only the enterprise device administrator applications can call the APIs provided by this module. > **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. -> The APIs of this module can be called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. +> - 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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. ## Modules to Import 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 7884e85188..7079f0abcd 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-deviceControl.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-deviceControl.md @@ -4,8 +4,8 @@ The **deviceControl** module provides APIs for device control, which can be call > **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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. +> - 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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. ## Modules to Import @@ -78,7 +78,7 @@ Restores factory settings. This API uses a promise to return the result. | Type | Description | | ----- | ----------------------------------- | -| Promise\ | Promise that returns no value. Throws an error object when the operation fails.| +| Promise\ | Promise that returns no value. If the operation fails, an error object is thrown.| **Error codes** 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 e84b5c267e..260d7cd7ff 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-deviceInfo.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-deviceInfo.md @@ -1,11 +1,11 @@ # @ohos.enterprise.deviceInfo (Device Information Management) -The deviceInfo module provides APIs for enterprise device information management, including the API for obtaining device serial numbers. Only the enterprise device administrator applications can call the APIs provided by this module. +The **deviceInfo** module provides APIs for enterprise device information management, including the API for obtaining device serial numbers. Only the enterprise device administrator applications can call the APIs provided by this module. > **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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. +> - 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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. ## Modules to Import @@ -36,7 +36,7 @@ Obtains the device serial number through the specified device administrator appl 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. | @@ -85,7 +85,7 @@ Obtains the device serial number through the specified device administrator appl 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. | @@ -127,7 +127,7 @@ Obtains the device version number through the specified device administrator app 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. | @@ -176,7 +176,7 @@ Obtains the device version number through the specified device administrator app 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. | @@ -218,7 +218,7 @@ Obtains the device name through the specified device administrator application. 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. | @@ -267,7 +267,7 @@ Obtains the device name through the specified device administrator application. 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. | diff --git a/en/application-dev/reference/apis/js-apis-enterprise-networkManager.md b/en/application-dev/reference/apis/js-apis-enterprise-networkManager.md index 880abaed10..b60b2519e1 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-networkManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-networkManager.md @@ -4,8 +4,8 @@ The **networkManager** module provides APIs for network management of enterprise > **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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. +> - 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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. ## Modules to Import @@ -17,7 +17,7 @@ import networkManager from '@ohos.enterprise.networkManager'; getAllNetworkInterfaces(admin: Want, callback: AsyncCallback<Array<string>>): void -Obtains all active network interfaces using the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains all active network interfaces through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -36,7 +36,7 @@ Obtains all active network interfaces using the specified device administrator a 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -61,7 +61,7 @@ networkManager.getAllNetworkInterfaces(wantTemp, (error, result) => { getAllNetworkInterfaces(admin: Want): Promise<Array<string>> -Obtains all active network interfaces using the specified device administrator application. This API uses a promise to return the result. +Obtains all active network interfaces through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -85,7 +85,7 @@ Obtains all active network interfaces using the specified device administrator a 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -108,7 +108,7 @@ networkManager.getAllNetworkInterfaces(wantTemp).then((result) => { getIpAddress(admin: Want, networkInterface: string, callback: AsyncCallback<string>): void -Obtains the device IP address based on the given network interface using the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the device IP address based on the given network interface through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -128,7 +128,7 @@ Obtains the device IP address based on the given network interface using the spe 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -153,7 +153,7 @@ networkManager.getIpAddress(wantTemp, "eth0", (error, result) => { getIpAddress(admin: Want, networkInterface: string): Promise<string> -Obtains the device IP address based on the given network interface using the specified device administrator application. This API uses a promise to return the result. +Obtains the device IP address based on the given network interface through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -178,7 +178,7 @@ Obtains the device IP address based on the given network interface using the spe 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -201,7 +201,7 @@ networkManager.getIpAddress(wantTemp, "eth0").then((result) => { getMac(admin: Want, networkInterface: string, callback: AsyncCallback<string>): void -Obtains the device MAC address based on the given network interface using the specified device administrator application. This API uses an asynchronous callback to return the result. +Obtains the device MAC address based on the given network interface through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -221,7 +221,7 @@ Obtains the device MAC address based on the given network interface using the sp 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -246,7 +246,7 @@ networkManager.getMac(wantTemp, "eth0", (error, result) => { getIpAddress(admin: Want, networkInterface: string): Promise<string> -Obtain the device MAC address based on the given network interface using the specified device administrator application. This API uses a promise to return the result. +Obtain the device MAC address based on the given network interface through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -271,7 +271,7 @@ Obtain the device MAC address based on the given network interface using the spe 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -294,7 +294,7 @@ networkManager.getMac(wantTemp, "eth0").then((result) => { isNetworkInterfaceDisabled(admin: Want, networkInterface: string, callback: AsyncCallback<boolean>): void -Checks whether a network interface is disabled using the specified device administrator application. This API uses an asynchronous callback to return the result. +Checks whether a network interface is disabled through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -314,7 +314,7 @@ Checks whether a network interface is disabled using the specified device admini 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -339,7 +339,7 @@ networkManager.isNetworkInterfaceDisabled(wantTemp, "eth0", (error, result) => { isNetworkInterfaceDisabled(admin: Want, networkInterface: string): Promise<boolean> -Checks whether a network interface is disabled using the specified device administrator application. This API uses a promise to return the result. +Checks whether a network interface is disabled through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_GET_NETWORK_INFO @@ -364,7 +364,7 @@ Checks whether a network interface is disabled using the specified device admini 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device.| @@ -387,7 +387,7 @@ networkManager.isNetworkInterfaceDisabled(wantTemp, "eth0").then((result) => { setNetworkInterfaceDisabled(admin: Want, networkInterface: string, isDisabled: boolean, callback: AsyncCallback<void>): void -Sets a network interface using the specified device administrator application. This API uses an asynchronous callback to return the result. +Sets a network interface through the specified device administrator application. This API uses an asynchronous callback to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_NETWORK @@ -433,7 +433,7 @@ networkManager.setNetworkInterfaceDisabled(wantTemp, "eth0", true, (error) => { setNetworkInterfaceDisabled(admin: Want, networkInterface: string, isDisabled: boolean): Promise<void> -Sets a network interface using the specified device administrator application. This API uses a promise to return the result. +Sets a network interface through the specified device administrator application. This API uses a promise to return the result. **Required permissions**: ohos.permission.ENTERPRISE_SET_NETWORK 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 d1902915f4..6990aa1fa5 100644 --- a/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md +++ b/en/application-dev/reference/apis/js-apis-enterprise-wifiManager.md @@ -4,8 +4,8 @@ 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 APIs of this module can be called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. +> - 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 called only after a [device administrator application](js-apis-enterprise-adminManager.md#adminmanagerenableadmin) is enabled. ## Modules to Import @@ -36,7 +36,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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device. | @@ -85,7 +85,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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device. | @@ -128,7 +128,7 @@ Sets Wi-Fi to connect to the specified network. This API uses an asynchronous ca 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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device. | @@ -183,7 +183,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 application of the device. | | 9200002 | The administrator application does not have permission to manage the device. | -- GitLab