1# @ohos.enterprise.adminManager (企业设备管理)
2
3本模块提供企业设备管理能力,使设备具备企业场景下所需的定制能力。
4
5> **说明:**
6>
7> 本模块首批接口从API version 12开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
8>
9> 本模块接口仅对[设备管理应用](../../mdm/mdm-kit-guide.md#功能介绍)开放,实现相应功能。
10
11## 导入模块
12
13```ts
14import { adminManager } from '@kit.MDMKit';
15```
16
17## adminManager.disableAdmin
18
19disableAdmin(admin: Want, userId?: number): Promise\<void>
20
21将当前/指定用户下指定的普通管理应用去激活。使用promise异步回调。
22
23**需要权限:** ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN
24
25**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
26
27
28
29**模型约束**: 此接口仅可在Stage模型下使用。
30
31**参数**:
32
33| 参数名 | 类型                                                    | 必填 | 说明                                                         |
34| ------ | ------------------------------------------------------- | ---- | ------------------------------------------------------------ |
35| admin  | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | 是   | 普通设备管理应用。                                           |
36| userId | number                                                  | 否   | 用户ID, 取值范围:大于等于0。<br> - 调用接口时,若传入userId,表示指定用户。<br> - 调用接口时,若未传入userId,表示当前用户。 |
37
38**返回值:**
39
40| 类型           | 说明                                                         |
41| -------------- | ------------------------------------------------------------ |
42| Promise\<void> | 无返回结果的Promise对象。当去激活普通管理应用失败时,会抛出错误对象。 |
43
44**错误码**:
45
46以下错误码的详细介绍请参见[企业设备管理错误码](errorcode-enterpriseDeviceManager.md)和[通用错误码](../errorcode-universal.md)。
47
48| 错误码ID | 错误信息                                                     |
49| -------- | ------------------------------------------------------------ |
50| 9200005  | Failed to deactivate the administrator application of the device. |
51| 201      | Permission verification failed. The application does not have the permission required to call the API. |
52| 401      | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. |
53
54**示例**:
55
56```ts
57import { Want } from '@kit.AbilityKit';
58import { BusinessError } from '@kit.BasicServicesKit';
59let wantTemp: Want = {
60  bundleName: 'bundleName',
61  abilityName: 'abilityName',
62};
63
64adminManager.disableAdmin(wantTemp, 100).catch((err: BusinessError) => {
65  console.error(`Failed to disable admin. Code: ${err.code}, message: ${err.message}`);
66});
67```
68
69## adminManager.subscribeManagedEventSync
70
71subscribeManagedEventSync(admin: Want, managedEvents: Array\<ManagedEvent>): void
72
73指定的设备管理应用订阅系统管理事件。
74
75**需要权限:** ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT
76
77**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
78
79
80
81**模型约束**: 此接口仅可在Stage模型下使用。
82
83**参数:**
84
85| 参数名        | 类型                                                    | 必填 | 说明           |
86| ------------- | ------------------------------------------------------- | ---- | -------------- |
87| admin         | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | 是   | 设备管理应用。 |
88| managedEvents | Array\<[ManagedEvent](#managedevent)>                   | 是   | 订阅事件数组。 |
89
90**错误码**:
91
92以下错误码的详细介绍请参见[企业设备管理错误码](errorcode-enterpriseDeviceManager.md)和[通用错误码](../errorcode-universal.md)。
93
94| 错误码ID | 错误信息                                                     |
95| -------- | ------------------------------------------------------------ |
96| 9200001  | The application is not an administrator application of the device. |
97| 9200008  | The specified system event is invalid.                       |
98| 201      | Permission verification failed. The application does not have the permission required to call the API. |
99| 401      | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. |
100
101**示例:**
102
103```ts
104import { Want } from '@kit.AbilityKit';
105let wantTemp: Want = {
106  bundleName: 'bundleName',
107  abilityName: 'abilityName',
108};
109let events: Array<adminManager.ManagedEvent> = [adminManager.ManagedEvent.MANAGED_EVENT_BUNDLE_ADDED, adminManager.ManagedEvent.MANAGED_EVENT_BUNDLE_REMOVED];
110
111try {
112  adminManager.subscribeManagedEventSync(wantTemp, events);
113  console.info('Succeeded in subscribing managed event.');
114} catch (err) {
115  console.error(`Failed to subscribe managed event. Code: ${err.code}, message: ${err.message}`);
116}
117```
118
119## adminManager.unsubscribeManagedEventSync
120
121unsubscribeManagedEventSync(admin: Want, managedEvents: Array\<ManagedEvent>): void
122
123指定的设备管理应用取消订阅系统管理事件。
124
125**需要权限:** ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT
126
127**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
128
129
130
131**模型约束**: 此接口仅可在Stage模型下使用。
132
133**参数:**
134
135| 参数名        | 类型                                                    | 必填 | 说明               |
136| ------------- | ------------------------------------------------------- | ---- | ------------------ |
137| admin         | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | 是   | 设备管理应用。     |
138| managedEvents | Array\<[ManagedEvent](#managedevent)>                   | 是   | 取消订阅事件数组。 |
139
140**错误码**:
141
142以下错误码的详细介绍请参见[企业设备管理错误码](errorcode-enterpriseDeviceManager.md)和[通用错误码](../errorcode-universal.md)。
143
144| 错误码ID | 错误信息                                                     |
145| -------- | ------------------------------------------------------------ |
146| 9200001  | The application is not an administrator application of the device. |
147| 9200008  | The specified system event is invalid.                       |
148| 201      | Permission verification failed. The application does not have the permission required to call the API. |
149| 401      | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. |
150
151**示例:**
152
153```ts
154import { Want } from '@kit.AbilityKit';
155let wantTemp: Want = {
156  bundleName: 'bundleName',
157  abilityName: 'abilityName',
158};
159let events: Array<adminManager.ManagedEvent> = [adminManager.ManagedEvent.MANAGED_EVENT_BUNDLE_ADDED, adminManager.ManagedEvent.MANAGED_EVENT_BUNDLE_REMOVED];
160
161try {
162  adminManager.unsubscribeManagedEventSync(wantTemp, events);
163  console.info('Succeeded in unsubscribing managed event.');
164} catch (err) {
165  console.error(`Failed to unsubscribe managed event. Code: ${err.code}, message: ${err.message}`);
166}
167```
168
169## adminManager.setDelegatedPolicies<sup>14+</sup>
170
171setDelegatedPolicies(admin: Want, bundleName: string, policies: Array&lt;string&gt;): void;
172
173委托其他应用来设置设备的管控策略。
174
175**需要权限:** ohos.permission.ENTERPRISE_MANAGE_DELEGATED_POLICY
176
177**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
178
179
180
181**模型约束**: 此接口仅可在Stage模型下使用。
182
183**参数:**
184
185| 参数名        | 类型                                                    | 必填 | 说明               |
186| ------------- | ------------------------------------------------------- | ---- | ------------------ |
187| admin         | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | 是   | 设备管理应用。     |
188| bundleName | string                   | 是   | 被委托应用包名。被委托应用仅支持enterprise_mdm和enterprise_normal两种类型,应用的分发类型具体请参考[指南](https://gitee.com/nezha-father/docs/blob/master/zh-cn/application-dev/security/app-provision-structure.md)。 |
189| policies |  Array&lt;string&gt;                   | 是   | [委托策略列表](#可委托策略列表)。 |
190
191**错误码**:
192
193以下错误码的详细介绍请参见[企业设备管理错误码](errorcode-enterpriseDeviceManager.md)和[通用错误码](../errorcode-universal.md)。
194
195| 错误码ID | 错误信息                                                     |
196| -------- | ------------------------------------------------------------ |
197| 9200001  | The application is not an administrator application of the device. |
198| 9200002  | The administrator application does not have permission to manage the device.                       |
199| 9200009  | Failed to grant the permission to the application.                       |
200| 201      | Permission verification failed. The application does not have the permission required to call the API. |
201| 401      | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. |
202
203**示例:**
204
205```ts
206import { Want } from '@kit.AbilityKit';
207let admin: Want = {
208  bundleName: 'bundleName',
209  abilityName: 'abilityName',
210};
211let policies: Array<string> = ["disabled_hdc"];
212
213try {
214  adminManager.setDelegatedPolicies(admin, "com.example.enterprise.xxx", policies);
215  console.info('Succeeded in setting delegated policies.');
216} catch (err) {
217  console.error(`Failed to set delegated policies. Code: ${err.code}, message: ${err.message}`);
218}
219```
220
221## adminManager.getDelegatedPolicies<sup>14+</sup>
222
223getDelegatedPolicies(admin: Want, bundleName: string): Array&lt;string&gt;;
224
225查询被委托应用可访问的策略列表。
226
227**需要权限:** ohos.permission.ENTERPRISE_MANAGE_DELEGATED_POLICY
228
229**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
230
231
232
233**模型约束**: 此接口仅可在Stage模型下使用。
234
235**参数:**
236
237| 参数名        | 类型                                                    | 必填 | 说明               |
238| ------------- | ------------------------------------------------------- | ---- | ------------------ |
239| admin         | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | 是   | 设备管理应用。     |
240| bundleName | string                   | 是   | 被委托应用包名。被委托应用仅支持enterprise_mdm和enterprise_normal两种类型,应用的分发类型具体请参考[指南](https://gitee.com/nezha-father/docs/blob/master/zh-cn/application-dev/security/app-provision-structure.md)。 |
241
242
243**返回值:**
244
245| 类型                   | 说明                      |
246| --------------------- | ------------------------- |
247| Array&lt;string&gt; | 委托策略列表。 |
248
249**错误码**:
250
251以下错误码的详细介绍请参见[企业设备管理错误码](errorcode-enterpriseDeviceManager.md)和[通用错误码](../errorcode-universal.md)。
252
253| 错误码ID | 错误信息                                                     |
254| -------- | ------------------------------------------------------------ |
255| 9200001  | The application is not an administrator application of the device. |
256| 9200002  | The administrator application does not have permission to manage the device.                       |
257| 201      | Permission verification failed. The application does not have the permission required to call the API. |
258| 401      | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. |
259
260**示例:**
261
262```ts
263import { Want } from '@kit.AbilityKit';
264let admin: Want = {
265  bundleName: 'bundleName',
266  abilityName: 'abilityName',
267};
268
269try {
270  let policies: Array<string> = adminManager.getDelegatedPolicies(admin, "com.example.enterprise.xxx");
271  console.info(`Succeeded in getting delegated policies.${JSON.stringify(policies)}`);
272} catch (err) {
273  console.error(`Failed to get delegated policies. Code: ${err.code}, message: ${err.message}`);
274}
275```
276
277## adminManager.getDelegatedBundleNames<sup>14+</sup>
278
279getDelegatedBundleNames(admin: Want, policy: string): Array&lt;string&gt;;
280
281查询可以访问某个委托策略的被委托应用,输出被委托应用列表。
282
283**需要权限:** ohos.permission.ENTERPRISE_MANAGE_DELEGATED_POLICY
284
285**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
286
287
288
289**模型约束**: 此接口仅可在Stage模型下使用。
290
291**参数:**
292
293| 参数名        | 类型                                                    | 必填 | 说明               |
294| ------------- | ------------------------------------------------------- | ---- | ------------------ |
295| admin         | [Want](../apis-ability-kit/js-apis-app-ability-want.md) | 是   | 设备管理应用。     |
296| policy | string                   | 是   | 委托策略。 |
297
298
299**返回值:**
300
301| 类型                   | 说明                      |
302| --------------------- | ------------------------- |
303| Array&lt;string&gt; | 被委托应用列表。 |
304
305**错误码**:
306
307以下错误码的详细介绍请参见[企业设备管理错误码](errorcode-enterpriseDeviceManager.md)和[通用错误码](../errorcode-universal.md)。
308
309| 错误码ID | 错误信息                                                     |
310| -------- | ------------------------------------------------------------ |
311| 9200001  | The application is not an administrator application of the device. |
312| 9200002  | The administrator application does not have permission to manage the device.                       |
313| 201      | Permission verification failed. The application does not have the permission required to call the API. |
314| 401      | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. |
315
316**示例:**
317
318```ts
319import { Want } from '@kit.AbilityKit';
320let admin: Want = {
321  bundleName: 'bundleName',
322  abilityName: 'abilityName',
323};
324
325try {
326  let bundleNames: Array<string> = adminManager.getDelegatedBundleNames(admin, "disabled_hdc");
327  console.info(`Succeeded in getting delegated bundles.${JSON.stringify(bundleNames)}`);
328} catch (err) {
329  console.error(`Failed to get delegated bundles. Code: ${err.code}, message: ${err.message}`);
330}
331```
332
333## ManagedEvent
334
335可订阅的系统管理事件。
336
337**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager
338
339
340
341| 名称                         | 值   | 说明           |
342| ---------------------------- | ---- | -------------- |
343| MANAGED_EVENT_BUNDLE_ADDED   | 0    | 应用安装事件。 |
344| MANAGED_EVENT_BUNDLE_REMOVED | 1    | 应用卸载事件。 |
345| MANAGED_EVENT_APP_START      | 2    | 应用启动事件。 |
346| MANAGED_EVENT_APP_STOP       | 3    | 应用停止事件。 |
347| MANAGED_EVENT_SYSTEM_UPDATE  | 4    | 系统更新事件。 |
348
349## 附录
350### 可委托策略列表
351| 策略名称 | 对应接口                                                     | 说明 |
352| --- | --- | --- |
353|disallow_add_local_account| [accountManager.disallowOsAccountAddition](js-apis-enterprise-accountManager.md#accountmanagerdisallowosaccountaddition)<br>[accountManager.isOsAccountAdditionDisallowed](js-apis-enterprise-accountManager.md#accountmanagerisosaccountadditiondisallowed) | 不传accountId参数,禁止设备创建本地用户。<br>不传accountId参数,查询是否禁止设备创建本地用户。|
354|disallow_add_os_account_by_user| [accountManager.disallowOsAccountAddition](js-apis-enterprise-accountManager.md#accountmanagerdisallowosaccountaddition)<br>[accountManager.isOsAccountAdditionDisallowed](js-apis-enterprise-accountManager.md#accountmanagerisosaccountadditiondisallowed) | 需传入accountId参数,禁止指定用户添加账号。<br>需传入accountId参数,查询是否禁止指定用户添加账号。|
355|disallow_running_bundles|[applicationManager.addDisallowedRunningBundlesSync](js-apis-enterprise-applicationManager.md#applicationmanageradddisallowedrunningbundlessync)<br>[applicationManager.removeDisallowedRunningBundlesSync](js-apis-enterprise-applicationManager.md#applicationmanagerremovedisallowedrunningbundlessync)<br>[applicationManager.getDisallowedRunningBundlesSync](js-apis-enterprise-applicationManager.md#applicationmanagergetdisallowedrunningbundlessync)|添加应用至应用运行黑名单,添加至黑名单的应用不允许在当前/指定用户下运行。<br>从应用运行黑名单中移除应用。<br>获取当前/指定用户下的应用运行黑名单。 |
356|manage_auto_start_apps|[applicationManager.addAutoStartApps](js-apis-enterprise-applicationManager.md#applicationmanageraddautostartapps)<br>[applicationManager.removeAutoStartApps](js-apis-enterprise-applicationManager.md#applicationmanagerremoveautostartapps)<br>[applicationManager.getAutoStartApps](js-apis-enterprise-applicationManager.md#applicationmanagergetautostartapps)|添加开机自启动应用名单。该能力当前仅支持2in1设备。<br>从开机自启动应用名单中移除应用。该能力当前仅支持2in1设备。<br>查询开机自启动应用名单。该能力当前仅支持2in1设备。
357|allowed_bluetooth_devices|[bluetoothManager.addAllowedBluetoothDevices](js-apis-enterprise-bluetoothManager.md#bluetoothmanageraddallowedbluetoothdevices)<br>[bluetoothManager.removeAllowedBluetoothDevices](js-apis-enterprise-bluetoothManager.md#bluetoothmanagerremoveallowedbluetoothdevices)<br>[bluetoothManager.getAllowedBluetoothDevices](js-apis-enterprise-bluetoothManager.md#bluetoothmanagergetallowedbluetoothdevices)|添加蓝牙设备可用白名单。<br>从蓝牙设备可用白名单中移除。<br>查询蓝牙设备可用白名单。
358|set_browser_policies|[browser.setPolicySync](js-apis-enterprise-browser.md#browsersetpolicysync)<br>[browser.getPoliciesSync](js-apis-enterprise-browser.md#browsergetpoliciessync)|为指定的浏览器设置浏览器子策略。<br>获取指定浏览器的策略。
359|allowed_install_bundles|[bundleManager.addAllowedInstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanageraddallowedinstallbundlessync)<br>[bundleManager.removeAllowedInstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanagerremoveallowedinstallbundlessync)<br>[bundleManager.getAllowedInstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanagergetallowedinstallbundlessync)|添加应用至包安装白名单,添加至白名单的应用允许在当前/指定用户下安装,否则不允许安装。<br>从包安装白名单中移除应用。<br>获取当前/指定用户下的包安装白名单。|
360|disallowed_install_bundles|[bundleManager.addDisallowedInstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanageradddisallowedinstallbundlessync)<br>[bundleManager.removeDisallowedInstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanagerremoveallowedinstallbundlessync)<br>[bundleManager.getDisallowedInstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanagergetdisallowedinstallbundlessync)|添加应用至包安装黑名单,添加至黑名单的应用不允许在当前/指定用户下安装。<br>从包安装黑名单中移除应用。<br>获取当前/指定用户下的包安装黑名单。|
361|disallowed_uninstall_bundles|[bundleManager.addDisallowedUninstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanageradddisalloweduninstallbundlessync)<br>[bundleManager.removeDisallowedUninstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanagerremovedisalloweduninstallbundlessync)<br>[bundleManager.getDisallowedUninstallBundlesSync](js-apis-enterprise-bundleManager.md#bundlemanagergetdisalloweduninstallbundlessync)|添添加应用至包卸载黑名单,添加至黑名单的应用不允许在当前/指定用户下卸载。<br>从包卸载黑名单中移除应用。<br>获取当前/指定用户下包卸载黑名单接口。|
362|get_device_info|[deviceInfo.getDeviceInfo](js-apis-enterprise-deviceInfo#deviceinfogetdeviceinfo)|获取设备信息。|
363|location_policy|[locationManager.setLocationPolicy](js-apis-enterprise-locationManager.md#locationmanagersetlocationpolicy)<br>[locationManager.getLocationPolicy](js-apis-enterprise-locationManager.md#locationmanagergetlocationpolicy)|设置位置服务管理策略。<br>查询位置服务策略。|
364|disabled_network_interface|[networkManager.setNetworkInterfaceDisabledSync](js-apis-enterprise-networkManager.md#networkmanagersetnetworkinterfacedisabledsync)<br>[networkManager.isNetworkInterfaceDisabledSync](js-apis-enterprise-networkManager.md#networkmanagerisnetworkinterfacedisabledsync)|禁止设备使用指定网络。<br>查询指定网络接口是否被禁用。|
365|global_proxy|[networkManager.setGlobalProxySync](js-apis-enterprise-networkManager.md#networkmanagersetglobalproxysync)<br>[networkManager.getGlobalProxySync](js-apis-enterprise-networkManager.md#networkmanagergetglobalproxysync)|设置网络全局代理。<br>获取网络全局代理。|
366|disabled_bluetooth|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入bluetooth,禁用/启用蓝牙能力。<br>feature传入bluetooth,查询是否禁用蓝牙能力。|
367|disallow_modify_datetime|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入modifyDateTime,禁用/启用设置系统时间能力。<br>feature传入modifyDateTime,查询是否禁用修改系统时间能力。|
368|disabled_printer|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入printer,禁用/启用打印能力。<br>feature传入printer,查询是否禁用打印能力。|
369|disabled_hdc|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入hdc,禁用/启用HDC能力。<br>feature传入hdc,查询是否禁用HDC能力。|
370|disable_microphone|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入microphone,禁用/启用麦克风能力。<br>feature传入microphone,查询是否禁用麦克风能力。|
371|fingerprint_auth|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)<br>[restrictions.setDisallowedPolicyForAccount](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicyforaccount14)<br>[restrictions.getDisallowedPolicyForAccount](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicyforaccount14)|feature传入fingerprint,禁用/启用指纹认证能力。<br>feature传入fingerprint,查询是否禁用指纹认证能力。<br>feature传入fingerprint,禁用/启用指定用户的指纹认证能力。<br>feature传入fingerprint,查询是否禁用指定用户的指纹认证能力。|
372|disable_usb|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入usb,禁用/启用USB能力。<br>feature传入usb,查询是否禁用USB能力。|
373|disable_wifi|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入wifi,禁用/启用WIFI能力。<br>feature传入wifi,查询是否禁用WIFI能力。|
374|disallowed_tethering|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入tethering,禁用/启用网络共享能力。<br>feature传入tethering,查询是否禁用网络共享能力。|
375|inactive_user_freeze|[restrictions.setDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionssetdisallowedpolicy)<br>[restrictions.getDisallowedPolicy](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedpolicy)|feature传入inactiveUserFreeze,禁用/启用非活跃用户运行能力。<br>feature传入inactiveUserFreeze,查询是否禁用非活跃用户运行能力。|
376|snapshot_skip|[restrictions.addDisallowedListForAccount](js-apis-enterprise-restrictions.md#restrictionsadddisallowedlistforaccount14)<br>[restrictions.removeDisallowedListForAccount](js-apis-enterprise-restrictions.md#restrictionsremovedisallowedlistforaccount14)<br>[restrictions.getDisallowedListForAccount](js-apis-enterprise-restrictions.md#restrictionsgetdisallowedlistforaccount14)|feature传入snapshotSkip,禁用屏幕快照能力的应用名单。<br>feature传入snapshotSkip,从禁用屏幕快照能力的应用名单中移除。<br>feature传入snapshotSkip,查询禁用屏幕快照能力的应用名单。|
377|password_policy|[securityManager.setPasswordPolicy](js-apis-enterprise-securityManager.md#securitymanagersetpasswordpolicy12)<br>[securityManager.getPasswordPolicy](js-apis-enterprise-securityManager.md#securitymanagergetpasswordpolicy12)|设置设备口令策略。<br>获取设备口令策略|
378|clipboard_policy|[securityManager.setAppClipboardPolicy](js-apis-enterprise-securityManager.md#securitymanagersetappclipboardpolicy12)<br>[securityManager.getAppClipboardPolicy](js-apis-enterprise-securityManager.md#securitymanagergetappclipboardpolicy12)|设置设备剪贴板策略。<br>获取设备剪贴板策略。|
379|watermark_image_policy|[securityManager.setWatermarkImage](js-apis-enterprise-securityManager.md#securitymanagersetwatermarkimage14)<br>[securityManager.cancelWatermarkImage](js-apis-enterprise-securityManager.md#securitymanagercancelwatermarkimage14)|设置水印策略,当前仅支持2in1使用。<br>取消水印策略,当前仅支持2in1使用。|
380|ntp_server|[systemManager.setNTPServer](js-apis-enterprise-systemManager.md#systemmanagersetntpserver)<br>[systemManager.getNTPServer](js-apis-enterprise-systemManager.md#systemmanagergetntpserver)|设置NTP服务器的策略。<br>获取NTP服务器信息。|
381|set_update_policy|[systemManager.setOtaUpdatePolicy](js-apis-enterprise-systemManager.md#systemmanagersetotaupdatepolicy)<br>[systemManager.getOtaUpdatePolicy](js-apis-enterprise-systemManager.md#systemmanagergetotaupdatepolicy)|设置升级策略。<br>查询升级策略。|
382|notify_upgrade_packages|[systemManager.notifyUpdatePackages](js-apis-enterprise-systemManager.md#systemmanagernotifyupdatepackages)<br>[systemManager.getUpdateResult](js-apis-enterprise-systemManager.md#systemmanagergetupdateresult)|通知系统更新包信息。<br>获取系统更新结果。|
383|allowed_usb_devices|[usbManager.addAllowedUsbDevices](js-apis-enterprise-usbManager.md#usbmanageraddallowedusbdevices)<br>[usbManager.removeAllowedUsbDevices](js-apis-enterprise-usbManager.md#usbmanagerremoveallowedusbdevices)<br>[usbManager.getAllowedUsbDevices](js-apis-enterprise-usbManager.md#usbmanagergetallowedusbdevices)|添加USB设备可用白名单。<br>移除USB设备可用白名单。<br>获取USB设备可用白名单。|
384|usb_read_only|[usbManager.setUsbStorageDeviceAccessPolicy](js-apis-enterprise-usbManager.md#usbmanagersetusbstoragedeviceaccesspolicy)<br>[usbManager.getUsbStorageDeviceAccessPolicy](js-apis-enterprise-usbManager.md#usbmanagergetusbstoragedeviceaccesspolicy)|设置USB存储设备访问策略。<br>获取USB存储设备访问策略。|
385|disallowed_usb_devices|[usbManager.addDisallowedUsbDevices](js-apis-enterprise-usbManager.md#usbmanageradddisallowedusbdevices14)<br>[usbManager.removeDisallowedUsbDevices](js-apis-enterprise-usbManager.md#usbmanagerremovedisallowedusbdevices14)<br>[usbManager.getDisallowedUsbDevices](js-apis-enterprise-usbManager.md#usbmanagergetdisallowedusbdevices14)|添加禁止使用的USB设备类型。<br>移除禁止使用的USB设备类型。<br>获取禁止使用的USB设备类型。|
386