From ac2680ad3cfc296c0a6eb47f6a8b451cf913dcc6 Mon Sep 17 00:00:00 2001 From: 18242988924 Date: Thu, 9 Nov 2023 06:19:41 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2=E5=8F=AF?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E9=A2=84=E7=BD=AE=E5=BA=94=E7=94=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 18242988924 Change-Id: I67e5963b28549f6d8f6c9daac2a57681cba72047 --- api/@ohos.bundle.bundleManager.d.ts | 36 ++++++++++ .../RecoverableApplicationInfo.d.ts | 68 +++++++++++++++++++ .../plugin/dictionaries_supplementary.txt | 1 + 3 files changed, 105 insertions(+) create mode 100644 api/bundleManager/RecoverableApplicationInfo.d.ts diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 956786002d..4dd41055fd 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -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, deleteOriginalFiles: boolean): Promise; + /** + * Obtains recoverable preinstalled applications. + * + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @param { AsyncCallback> } 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>): void; + + /** + * Obtains recoverable preinstalled applications. + * + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @returns { Promise> } 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>; + /** * 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; diff --git a/api/bundleManager/RecoverableApplicationInfo.d.ts b/api/bundleManager/RecoverableApplicationInfo.d.ts new file mode 100644 index 0000000000..68c5f9399f --- /dev/null +++ b/api/bundleManager/RecoverableApplicationInfo.d.ts @@ -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; +} diff --git a/build-tools/api_check_plugin/plugin/dictionaries_supplementary.txt b/build-tools/api_check_plugin/plugin/dictionaries_supplementary.txt index ea0f99e5db..828f8ec6bc 100644 --- a/build-tools/api_check_plugin/plugin/dictionaries_supplementary.txt +++ b/build-tools/api_check_plugin/plugin/dictionaries_supplementary.txt @@ -543,6 +543,7 @@ preconnected preconnectable preempted preferentially +preinstalled prelaunch preloads premises