feat: add killProcessesInBatch

Signed-off-by: yangxuguang-huawei <yangxuguang3@huawei.com>
This commit is contained in:
yangxuguang-huawei 2024-11-17 16:27:42 +08:00
parent 943252ed1a
commit e431d91c0a

View File

@ -1198,6 +1198,24 @@ declare namespace appManager {
*/
function getKeepAliveBundles(type: KeepAliveAppType, userId?: number): Promise<Array<KeepAliveBundleInfo>>;
/**
* Kill processes in batch.
*
* @permission ohos.permission.KILL_APP_PROCESSES
* @param { Array<number> } pids - The pids of the processes.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 14
*/
function killProcessesInBatch(pids: Array<number>): Promise<void>;
/**
* The ability or extension state data.
*