diff --git a/api/@ohos.enterprise.EnterpriseAdminExtensionAbility.d.ts b/api/@ohos.enterprise.EnterpriseAdminExtensionAbility.d.ts index b0d867a73bd4f24a27ee14d0a04e9c1a95cd4436..e2bbd9efb19453eee6011e0d0f5d5d6d74e8cbab 100644 --- a/api/@ohos.enterprise.EnterpriseAdminExtensionAbility.d.ts +++ b/api/@ohos.enterprise.EnterpriseAdminExtensionAbility.d.ts @@ -156,4 +156,28 @@ export default class EnterpriseAdminExtensionAbility { * @since 18 */ onAccountRemoved(accountId: number): void; + + /** + * Called back when a bundle entering kiosk mode under an account. + * + * @param { string } bundleName - bundleName indicates the name of the bundle. + * @param { number } accountId - accountId indicates the account ID. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ + onKioskModeEntering(bundleName: string, accountId: number): void; + + /** + * Called back when a bundle exiting kiosk mode under an account. + * + * @param { string } bundleName - bundleName indicates the name of the bundle. + * @param { number } accountId - accountId indicates the account ID. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ + onKioskModeExiting(bundleName: string, accountId: number): void; } diff --git a/api/@ohos.enterprise.applicationManager.d.ts b/api/@ohos.enterprise.applicationManager.d.ts index ad5bca6db3718f96781e376ed80ee7ca3a8399a4..e50f33d0b9e9139f5b33b75ff6fd08ced68d461b 100644 --- a/api/@ohos.enterprise.applicationManager.d.ts +++ b/api/@ohos.enterprise.applicationManager.d.ts @@ -445,6 +445,56 @@ declare namespace applicationManager { * @since 20 */ function clearUpApplicationData(admin: Want, bundleName: string, appIndex: number, accountId: number): void; + + /** + * Set applications allowed running in kiosk mode. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_SET_KIOSK + * @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. + * @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 setAllowedKioskApps(amdin: Want, bundleNames: Array): void; + + /** + * Get applications allowed running in kiosk mode. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_SET_KIOSK + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @returns { Array } the bundle names of allowed running in kiosk mode. + * @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 getAllowedKioskApps(amdin: Want): Array; + + /** + * Check target application allowed running in kiosk mode. + * + * @param { string } bundleName - bundleName indicates the bundle names of application. + * @returns { boolean } true means the bundle name allowed running in kiosk mode, otherwise false. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ + function isAppKioskAllowed(bundleName: string): boolean; } export default applicationManager; \ No newline at end of file