diff --git a/api/@ohos.enterpriseDeviceManager.d.ts b/api/@ohos.enterpriseDeviceManager.d.ts index 1683d8d0fa3340de026067d60b17d179a2c913a6..db9a78797696e8c1c9ec5c45aadc24de1f15225e 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; /**