!7592 新增查询可恢复预置应用接口

Merge pull request !7592 from 张欣宇/master
This commit is contained in:
openharmony_ci 2023-11-15 03:28:54 +00:00 committed by Gitee
commit bc3ec799a2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 105 additions and 0 deletions

View File

@ -19,6 +19,7 @@ import { Metadata as _Metadata } from './bundleManager/Metadata';
import { PermissionDef as _PermissionDef } from './bundleManager/PermissionDef';
import { ElementName as _ElementName } from './bundleManager/ElementName';
import { SharedBundleInfo as _SharedBundleInfo } from './bundleManager/SharedBundleInfo';
import type { RecoverableApplicationInfo as _RecoverableApplicationInfo } from './bundleManager/RecoverableApplicationInfo';
import Want from './@ohos.app.ability.Want';
import * as _AbilityInfo from './bundleManager/AbilityInfo';
import * as _AppProvisionInfo from './bundleManager/AppProvisionInfo';
@ -2689,6 +2690,32 @@ declare namespace bundleManager {
*/
function verifyAbc(abcPaths: Array<string>, deleteOriginalFiles: boolean): Promise<void>;
/**
* Obtains recoverable preinstalled applications.
*
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @param { AsyncCallback<Array<RecoverableApplicationInfo>> } callback - The callback of getting a list of RecoverableApplicationInfo objects.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
function getRecoverableApplicationInfo(callback: AsyncCallback<Array<RecoverableApplicationInfo>>): void;
/**
* Obtains recoverable preinstalled applications.
*
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @returns { Promise<Array<RecoverableApplicationInfo>> } Returns a list of RecoverableApplicationInfo objects.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
function getRecoverableApplicationInfo(): Promise<Array<RecoverableApplicationInfo>>;
/**
* Obtains configuration information about an application.
*
@ -2934,6 +2961,15 @@ declare namespace bundleManager {
* @since 10
*/
export type Validity = _AppProvisionInfo.Validity;
/**
* Obtains information about a recoverable preinstalled application.
*
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
export type RecoverableApplicationInfo = _RecoverableApplicationInfo;
}
export default bundleManager;

View File

@ -0,0 +1,68 @@
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Indicates the RecoverableApplicationInfo
*
* @typedef RecoverableApplicationInfo
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
export interface RecoverableApplicationInfo {
/**
* Indicates the bundle name
*
* @type { string }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
readonly bundleName: string;
/**
* Indicates the module name
*
* @type { string }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
readonly moduleName: string;
/**
* Indicates the label id
*
* @type { number }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
readonly labelId: number;
/**
* Indicates the icon id
*
* @type { number }
* @readonly
* @syscap SystemCapability.BundleManager.BundleFramework.Core
* @systemapi
* @since 11
*/
readonly iconId: number;
}

View File

@ -543,6 +543,7 @@ preconnected
preconnectable
preempted
preferentially
preinstalled
prelaunch
preloads
premises