From b9b51e5e87097211864ff111b622ba8d15dfc4be Mon Sep 17 00:00:00 2001 From: caiminggang Date: Thu, 7 Jul 2022 20:14:16 +0800 Subject: [PATCH] =?UTF-8?q?EnterpriseDeviceManager=E5=A4=9A=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=8E=A5=E5=8F=A3Callback=E6=A8=A1=E5=BC=8F=E5=8F=AF?= =?UTF-8?q?=E9=80=89=E5=8F=82=E6=95=B0=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caiminggang --- api/@ohos.enterpriseDeviceManager.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/api/@ohos.enterpriseDeviceManager.d.ts b/api/@ohos.enterpriseDeviceManager.d.ts index 1683d8d0fa..db9a787976 100644 --- a/api/@ohos.enterpriseDeviceManager.d.ts +++ b/api/@ohos.enterpriseDeviceManager.d.ts @@ -59,7 +59,8 @@ declare namespace enterpriseDeviceManager { * @return {@code true} if enables administrator success. * @permission ohos.permission.MANAGE_ADMIN */ - function enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number, callback: AsyncCallback): void; + function enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback): void; + function enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback): void; function enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise; /** @@ -74,7 +75,8 @@ declare namespace enterpriseDeviceManager { * @return {@code true} if disables administrator success. * @permission ohos.permission.MANAGE_ADMIN */ - function disableAdmin(admin: Want, userId?: number, callback: AsyncCallback): void; + function disableAdmin(admin: Want, callback: AsyncCallback): void; + function disableAdmin(admin: Want, userId: number, callback: AsyncCallback): void; function disableAdmin(admin: Want, userId?: number): Promise; /** @@ -99,7 +101,8 @@ declare namespace enterpriseDeviceManager { * @param userId Indicates the user ID or do not pass user ID. * @return {@code true} if the administrator is enabled. */ - function isAdminEnabled(admin: Want, userId?: number, callback: AsyncCallback): void; + function isAdminEnabled(admin: Want, callback: AsyncCallback): void; + function isAdminEnabled(admin: Want, userId: number, callback: AsyncCallback): void; function isAdminEnabled(admin: Want, userId?: number): Promise; /** -- Gitee