From 9834054b41398e15101b1c46a23bd99e550681d6 Mon Sep 17 00:00:00 2001 From: hanKF Date: Thu, 12 Jun 2025 11:45:00 +0000 Subject: [PATCH] =?UTF-8?q?mdm=E6=8F=90=E4=BE=9B=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BF=9D=E6=B4=BB=E7=AD=96=E7=95=A5=E5=92=8C?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=98=AF=E5=90=A6=E5=8F=AF=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E4=BF=9D=E6=B4=BB=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hanKF --- api/@ohos.enterprise.applicationManager.d.ts | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/api/@ohos.enterprise.applicationManager.d.ts b/api/@ohos.enterprise.applicationManager.d.ts index 87494b74a0..0698a31712 100644 --- a/api/@ohos.enterprise.applicationManager.d.ts +++ b/api/@ohos.enterprise.applicationManager.d.ts @@ -492,6 +492,51 @@ declare namespace applicationManager { * @since 20 */ function isAppKioskAllowed(bundleName: string): boolean; + + /** + * Adds keep alive applications which are not allowed to modify their keep alive settings. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_APPLICATION + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { Array } bundleNames - bundleNames indicates the bundle names of applications added to the keep + * alive list. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @param { boolean } disallowModify - disallowModify specifies whether the applications + * are disallowed to modify their keep alive setting. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200010 - A conflict policy has been configured. + * @throws { BusinessError } 9201005 - Add keep alive applications failed. + * @throws { BusinessError } 201 - Permission verification failed.The application does not have the permission + * required to call the API + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ + function addKeepAliveApps(admin: Want, bundleNames: Array, accountId: number, disallowModify: boolean): void; + + /** + * Checks whether the specified application is allowed to modify its keep alive setting. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_APPLICATION + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @param { string } bundleName - bundleName indicates the bundle name of application to be checked. + * @returns { boolean } true indicates the application is not allowed to modify its keep alive setting. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ + function isModifyKeepAliveAppsDisallowed(admin: Want, accountId: number, bundleName: string): boolean; } export default applicationManager; \ No newline at end of file -- Gitee