161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit AbilityKit 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ciimport { AsyncCallback } from './@ohos.base'; 2261847f8eSopenharmony_ciimport type { ElementName } from './bundleManager/ElementName'; 2361847f8eSopenharmony_ciimport Want from './@ohos.app.ability.Want'; 2461847f8eSopenharmony_ci 2561847f8eSopenharmony_ci/** 2661847f8eSopenharmony_ci * Used for application interception control 2761847f8eSopenharmony_ci * 2861847f8eSopenharmony_ci * @namespace appControl 2961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 3061847f8eSopenharmony_ci * @systemapi 3161847f8eSopenharmony_ci * @since 9 3261847f8eSopenharmony_ci */ 3361847f8eSopenharmony_cideclare namespace appControl { 3461847f8eSopenharmony_ci /** 3561847f8eSopenharmony_ci * Indicates the ability component type. 3661847f8eSopenharmony_ci * 3761847f8eSopenharmony_ci * @enum { number } 3861847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 3961847f8eSopenharmony_ci * @systemapi 4061847f8eSopenharmony_ci * @since 11 4161847f8eSopenharmony_ci */ 4261847f8eSopenharmony_ci export enum ComponentType { 4361847f8eSopenharmony_ci /** 4461847f8eSopenharmony_ci * Indicates the UI ability type. 4561847f8eSopenharmony_ci * 4661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 4761847f8eSopenharmony_ci * @systemapi 4861847f8eSopenharmony_ci * @since 11 4961847f8eSopenharmony_ci */ 5061847f8eSopenharmony_ci UI_ABILITY = 1, 5161847f8eSopenharmony_ci 5261847f8eSopenharmony_ci /** 5361847f8eSopenharmony_ci * Indicates the extension ability type. 5461847f8eSopenharmony_ci * 5561847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 5661847f8eSopenharmony_ci * @systemapi 5761847f8eSopenharmony_ci * @since 11 5861847f8eSopenharmony_ci */ 5961847f8eSopenharmony_ci UI_EXTENSION = 2 6061847f8eSopenharmony_ci } 6161847f8eSopenharmony_ci 6261847f8eSopenharmony_ci /** 6361847f8eSopenharmony_ci * Indicates when to intercept the specified application. 6461847f8eSopenharmony_ci * 6561847f8eSopenharmony_ci * @enum { number } 6661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 6761847f8eSopenharmony_ci * @systemapi 6861847f8eSopenharmony_ci * @since 11 6961847f8eSopenharmony_ci */ 7061847f8eSopenharmony_ci export enum DisposedType { 7161847f8eSopenharmony_ci /** 7261847f8eSopenharmony_ci * All abilities will be blocked. 7361847f8eSopenharmony_ci * 7461847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 7561847f8eSopenharmony_ci * @systemapi 7661847f8eSopenharmony_ci * @since 11 7761847f8eSopenharmony_ci */ 7861847f8eSopenharmony_ci BLOCK_APPLICATION = 1, 7961847f8eSopenharmony_ci /** 8061847f8eSopenharmony_ci * Only the specified abilities will be blocked. 8161847f8eSopenharmony_ci * 8261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 8361847f8eSopenharmony_ci * @systemapi 8461847f8eSopenharmony_ci * @since 11 8561847f8eSopenharmony_ci */ 8661847f8eSopenharmony_ci BLOCK_ABILITY = 2, 8761847f8eSopenharmony_ci /** 8861847f8eSopenharmony_ci * All abilities will not be blocked. 8961847f8eSopenharmony_ci * 9061847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 9161847f8eSopenharmony_ci * @systemapi 9261847f8eSopenharmony_ci * @since 11 9361847f8eSopenharmony_ci */ 9461847f8eSopenharmony_ci NON_BLOCK = 3 9561847f8eSopenharmony_ci } 9661847f8eSopenharmony_ci 9761847f8eSopenharmony_ci /** 9861847f8eSopenharmony_ci * Indicates the strategy to intercept the specified application. 9961847f8eSopenharmony_ci * 10061847f8eSopenharmony_ci * @enum { number } 10161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 10261847f8eSopenharmony_ci * @systemapi 10361847f8eSopenharmony_ci * @since 11 10461847f8eSopenharmony_ci */ 10561847f8eSopenharmony_ci export enum ControlType { 10661847f8eSopenharmony_ci /** 10761847f8eSopenharmony_ci * Only the specified abilities are allowed to run. 10861847f8eSopenharmony_ci * 10961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 11061847f8eSopenharmony_ci * @systemapi 11161847f8eSopenharmony_ci * @since 11 11261847f8eSopenharmony_ci */ 11361847f8eSopenharmony_ci ALLOWED_LIST = 1, 11461847f8eSopenharmony_ci /** 11561847f8eSopenharmony_ci * The specified abilities are not allowed to run. 11661847f8eSopenharmony_ci * 11761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 11861847f8eSopenharmony_ci * @systemapi 11961847f8eSopenharmony_ci * @since 11 12061847f8eSopenharmony_ci */ 12161847f8eSopenharmony_ci DISALLOWED_LIST = 2 12261847f8eSopenharmony_ci } 12361847f8eSopenharmony_ci 12461847f8eSopenharmony_ci /** 12561847f8eSopenharmony_ci * Indicates the rule for interception. 12661847f8eSopenharmony_ci * 12761847f8eSopenharmony_ci * @typedef DisposedRule 12861847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 12961847f8eSopenharmony_ci * @systemapi 13061847f8eSopenharmony_ci * @since 11 13161847f8eSopenharmony_ci */ 13261847f8eSopenharmony_ci export interface DisposedRule { 13361847f8eSopenharmony_ci /** 13461847f8eSopenharmony_ci * Indicates the ability that will be pulled up when interception occurs. 13561847f8eSopenharmony_ci * 13661847f8eSopenharmony_ci * @type { Want } 13761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 13861847f8eSopenharmony_ci * @systemapi 13961847f8eSopenharmony_ci * @since 11 14061847f8eSopenharmony_ci */ 14161847f8eSopenharmony_ci want: Want; 14261847f8eSopenharmony_ci 14361847f8eSopenharmony_ci /** 14461847f8eSopenharmony_ci * Indicates the type of the ability that will be pulled up when interception occurs. 14561847f8eSopenharmony_ci * 14661847f8eSopenharmony_ci * @type { ComponentType } 14761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 14861847f8eSopenharmony_ci * @systemapi 14961847f8eSopenharmony_ci * @since 11 15061847f8eSopenharmony_ci */ 15161847f8eSopenharmony_ci componentType: ComponentType; 15261847f8eSopenharmony_ci 15361847f8eSopenharmony_ci /** 15461847f8eSopenharmony_ci * Indicates when to intercept the specified application. 15561847f8eSopenharmony_ci * 15661847f8eSopenharmony_ci * @type { DisposedType } 15761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 15861847f8eSopenharmony_ci * @systemapi 15961847f8eSopenharmony_ci * @since 11 16061847f8eSopenharmony_ci */ 16161847f8eSopenharmony_ci disposedType: DisposedType; 16261847f8eSopenharmony_ci 16361847f8eSopenharmony_ci /** 16461847f8eSopenharmony_ci * Indicates the interception policy. 16561847f8eSopenharmony_ci * 16661847f8eSopenharmony_ci * @type { ControlType } 16761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 16861847f8eSopenharmony_ci * @systemapi 16961847f8eSopenharmony_ci * @since 11 17061847f8eSopenharmony_ci */ 17161847f8eSopenharmony_ci controlType: ControlType; 17261847f8eSopenharmony_ci 17361847f8eSopenharmony_ci /** 17461847f8eSopenharmony_ci * Indicates the abilities to be disposed of the specified application. 17561847f8eSopenharmony_ci * 17661847f8eSopenharmony_ci * @type { Array<ElementName> } 17761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 17861847f8eSopenharmony_ci * @systemapi 17961847f8eSopenharmony_ci * @since 11 18061847f8eSopenharmony_ci */ 18161847f8eSopenharmony_ci elementList: Array<ElementName> ; 18261847f8eSopenharmony_ci 18361847f8eSopenharmony_ci /** 18461847f8eSopenharmony_ci * Indicates priority of the rule. 18561847f8eSopenharmony_ci * 18661847f8eSopenharmony_ci * @type { number } 18761847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 18861847f8eSopenharmony_ci * @systemapi 18961847f8eSopenharmony_ci * @since 11 19061847f8eSopenharmony_ci */ 19161847f8eSopenharmony_ci priority: number; 19261847f8eSopenharmony_ci } 19361847f8eSopenharmony_ci 19461847f8eSopenharmony_ci /** 19561847f8eSopenharmony_ci * Set the disposed status of a specified bundle. 19661847f8eSopenharmony_ci * 19761847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 19861847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 19961847f8eSopenharmony_ci * @param { Want } disposedWant - Indicates the disposed want. 20061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setting the disposed status result. 20161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 20261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 20361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 20461847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 20561847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 20661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 20761847f8eSopenharmony_ci * @systemapi 20861847f8eSopenharmony_ci * @since 9 20961847f8eSopenharmony_ci */ 21061847f8eSopenharmony_ci function setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback<void>): void; 21161847f8eSopenharmony_ci 21261847f8eSopenharmony_ci /** 21361847f8eSopenharmony_ci * Set the disposed status of a specified bundle. 21461847f8eSopenharmony_ci * 21561847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 21661847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 21761847f8eSopenharmony_ci * @param { Want } disposedWant - Indicates the disposed want. 21861847f8eSopenharmony_ci * @returns { Promise<void> } The result of setting the disposed status of a specified bundle. 21961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 22061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 22161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 22261847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 22361847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 22461847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 22561847f8eSopenharmony_ci * @systemapi 22661847f8eSopenharmony_ci * @since 9 22761847f8eSopenharmony_ci */ 22861847f8eSopenharmony_ci function setDisposedStatus(appId: string, disposedWant: Want): Promise<void>; 22961847f8eSopenharmony_ci 23061847f8eSopenharmony_ci /** 23161847f8eSopenharmony_ci * Set the disposed status of a specified bundle. 23261847f8eSopenharmony_ci * 23361847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 23461847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 23561847f8eSopenharmony_ci * @param { Want } disposedWant - Indicates the disposed want. 23661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 23761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 23861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 23961847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 24061847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 24161847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 24261847f8eSopenharmony_ci * @systemapi 24361847f8eSopenharmony_ci * @since 10 24461847f8eSopenharmony_ci */ 24561847f8eSopenharmony_ci function setDisposedStatusSync(appId: string, disposedWant: Want): void; 24661847f8eSopenharmony_ci 24761847f8eSopenharmony_ci /** 24861847f8eSopenharmony_ci * Obtains the disposed status of a specified bundle. 24961847f8eSopenharmony_ci * 25061847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 25161847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 25261847f8eSopenharmony_ci * @param { AsyncCallback<Want> } callback - The callback of getting the disposed status of a specified bundle result. 25361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 25461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 25561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 25661847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 25761847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 25861847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 25961847f8eSopenharmony_ci * @systemapi 26061847f8eSopenharmony_ci * @since 9 26161847f8eSopenharmony_ci */ 26261847f8eSopenharmony_ci function getDisposedStatus(appId: string, callback: AsyncCallback<Want>): void; 26361847f8eSopenharmony_ci 26461847f8eSopenharmony_ci /** 26561847f8eSopenharmony_ci * Obtains the disposed status of a specified bundle. 26661847f8eSopenharmony_ci * 26761847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 26861847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 26961847f8eSopenharmony_ci * @returns { Promise<Want> } Returns the disposed status of a specified bundle. 27061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 27161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 27261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 27361847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 27461847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 27561847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 27661847f8eSopenharmony_ci * @systemapi 27761847f8eSopenharmony_ci * @since 9 27861847f8eSopenharmony_ci */ 27961847f8eSopenharmony_ci function getDisposedStatus(appId: string): Promise<Want>; 28061847f8eSopenharmony_ci 28161847f8eSopenharmony_ci /** 28261847f8eSopenharmony_ci * Obtains the disposed status of a specified bundle. 28361847f8eSopenharmony_ci * 28461847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 28561847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 28661847f8eSopenharmony_ci * @returns { Want } Returns the disposed status of a specified bundle. 28761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 28861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 28961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 29061847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 29161847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 29261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 29361847f8eSopenharmony_ci * @systemapi 29461847f8eSopenharmony_ci * @since 10 29561847f8eSopenharmony_ci */ 29661847f8eSopenharmony_ci function getDisposedStatusSync(appId: string): Want; 29761847f8eSopenharmony_ci 29861847f8eSopenharmony_ci /** 29961847f8eSopenharmony_ci * Delete the disposed status of a specified bundle. 30061847f8eSopenharmony_ci * 30161847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 30261847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 30361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of deleting the disposed status of a specified bundle result. 30461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 30561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 30661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 30761847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 30861847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 30961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 31061847f8eSopenharmony_ci * @systemapi 31161847f8eSopenharmony_ci * @since 9 31261847f8eSopenharmony_ci */ 31361847f8eSopenharmony_ci function deleteDisposedStatus(appId: string, callback: AsyncCallback<void>): void; 31461847f8eSopenharmony_ci 31561847f8eSopenharmony_ci /** 31661847f8eSopenharmony_ci * Delete the disposed status of a specified bundle. 31761847f8eSopenharmony_ci * 31861847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 31961847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 32061847f8eSopenharmony_ci * @returns { Promise<void> } Returns the result of deleting the disposed status of a specified bundle. 32161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 32261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 32361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 32461847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 32561847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 32661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 32761847f8eSopenharmony_ci * @systemapi 32861847f8eSopenharmony_ci * @since 9 32961847f8eSopenharmony_ci */ 33061847f8eSopenharmony_ci function deleteDisposedStatus(appId: string): Promise<void>; 33161847f8eSopenharmony_ci 33261847f8eSopenharmony_ci /** 33361847f8eSopenharmony_ci * Delete the disposed status of a specified bundle. 33461847f8eSopenharmony_ci * 33561847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 33661847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 33761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 33861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 33961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 34061847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 34161847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is empty string. 34261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 34361847f8eSopenharmony_ci * @systemapi 34461847f8eSopenharmony_ci * @since 10 34561847f8eSopenharmony_ci */ 34661847f8eSopenharmony_ci /** 34761847f8eSopenharmony_ci * Delete the disposed status of a specified bundle. 34861847f8eSopenharmony_ci * 34961847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 35061847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 35161847f8eSopenharmony_ci * @param { number } [appIndex] Indicates the index of clone app. 35261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 35361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. 35461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 35561847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 35661847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is invalid. 35761847f8eSopenharmony_ci * @throws { BusinessError } 17700061 - AppIndex is not in the valid range. 35861847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 35961847f8eSopenharmony_ci * @systemapi 36061847f8eSopenharmony_ci * @since 12 36161847f8eSopenharmony_ci */ 36261847f8eSopenharmony_ci function deleteDisposedStatusSync(appId: string, appIndex?: number): void; 36361847f8eSopenharmony_ci 36461847f8eSopenharmony_ci /** 36561847f8eSopenharmony_ci * Obtains the disposed rule of a specified bundle. 36661847f8eSopenharmony_ci * 36761847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 36861847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 36961847f8eSopenharmony_ci * @returns { DisposedRule } Returns the disposed rule of a specified bundle. 37061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 37161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. 37261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 37361847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 37461847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is an empty string. 37561847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 37661847f8eSopenharmony_ci * @systemapi 37761847f8eSopenharmony_ci * @since 11 37861847f8eSopenharmony_ci */ 37961847f8eSopenharmony_ci /** 38061847f8eSopenharmony_ci * Obtains the disposed rule of a specified bundle. 38161847f8eSopenharmony_ci * 38261847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 38361847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 38461847f8eSopenharmony_ci * @param { number } [appIndex] Indicates the index of clone app. 38561847f8eSopenharmony_ci * @returns { DisposedRule } Returns the disposed rule of a specified bundle. 38661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 38761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. 38861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 38961847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 39061847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is invalid. 39161847f8eSopenharmony_ci * @throws { BusinessError } 17700061 - AppIndex is not in the valid range. 39261847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 39361847f8eSopenharmony_ci * @systemapi 39461847f8eSopenharmony_ci * @since 12 39561847f8eSopenharmony_ci */ 39661847f8eSopenharmony_ci function getDisposedRule(appId: string, appIndex?: number): DisposedRule; 39761847f8eSopenharmony_ci 39861847f8eSopenharmony_ci /** 39961847f8eSopenharmony_ci * Sets the disposed rule of a specified bundle. 40061847f8eSopenharmony_ci * 40161847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 40261847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 40361847f8eSopenharmony_ci * @param { DisposedRule } rule - Indicates the disposed rule of a specified bundle. 40461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 40561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. 40661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 40761847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 40861847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is an empty string. 40961847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 41061847f8eSopenharmony_ci * @systemapi 41161847f8eSopenharmony_ci * @since 11 41261847f8eSopenharmony_ci */ 41361847f8eSopenharmony_ci /** 41461847f8eSopenharmony_ci * Sets the disposed rule of a specified bundle. 41561847f8eSopenharmony_ci * 41661847f8eSopenharmony_ci * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS 41761847f8eSopenharmony_ci * @param { string } appId - Indicates the app ID of the application. 41861847f8eSopenharmony_ci * @param { DisposedRule } rule - Indicates the disposed rule of a specified bundle. 41961847f8eSopenharmony_ci * @param { number } [appIndex] Indicates the index of clone app. 42061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 42161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. 42261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 42361847f8eSopenharmony_ci * @throws { BusinessError } 801 - Capability not supported. 42461847f8eSopenharmony_ci * @throws { BusinessError } 17700005 - The specified app ID is invalid. 42561847f8eSopenharmony_ci * @throws { BusinessError } 17700061 - AppIndex is not in the valid range. 42661847f8eSopenharmony_ci * @syscap SystemCapability.BundleManager.BundleFramework.AppControl 42761847f8eSopenharmony_ci * @systemapi 42861847f8eSopenharmony_ci * @since 12 42961847f8eSopenharmony_ci */ 43061847f8eSopenharmony_ci function setDisposedRule(appId: string, rule: DisposedRule, appIndex?: number): void; 43161847f8eSopenharmony_ci} 43261847f8eSopenharmony_ci 43361847f8eSopenharmony_ciexport default appControl; 434