From b342177cd4ff6e77b02b013bc0af0faa0c4a894a Mon Sep 17 00:00:00 2001 From: zhaogan Date: Wed, 19 Oct 2022 11:55:26 +0800 Subject: [PATCH] Issue: #I5WIDP Description: rename BundleManager.BundleInfo.PermissionGrantState Sig: SIG_ApplicaitonFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: zhaogan --- api/@ohos.bundle.bundleManager.d.ts | 26 ++++++++++++-------------- api/bundleManager/bundleInfo.d.ts | 10 +++++----- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 858f6aa818..913d650989 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -227,9 +227,8 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; /** * Obtains own bundleInfo. - * @param { number } bundleFlags - Indicates BundleFlag, the value in bundleFlag can be used in or. + * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. * @returns { Promise } The result of getting the bundle info. - * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 @@ -238,9 +237,8 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; /** * Obtains own bundleInfo. - * @param { number } bundleFlags - Indicates BundleFlag, the value in bundleFlag can be used in or. + * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. * @param { AsyncCallback } callback - The callback of getting bundle info result. - * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 @@ -251,7 +249,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * Obtains bundleInfo based on bundleName, bundleFlags and options. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } bundleFlags - Indicates BundleFlag, the value in bundleFlag can be used in or. + * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. * @param { number } userId - Indicates the user ID or do not pass user ID. * @param { AsyncCallback } callback - The callback of getting bundle info result. * @throws { BusinessError } 201 - Permission denied. @@ -270,7 +268,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * Obtains bundleInfo based on bundleName, bundleFlags and options. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } bundleFlags - Indicates BundleFlag, the value in bundleFlag can be used in or. + * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. * @param { number } userId - Indicates the user ID or do not pass user ID. * @returns { Promise } The result of getting the bundle info. * @throws { BusinessError } 201 - Permission denied. @@ -288,7 +286,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } appFlags - Indicates ApplicationFlag, the value in ApplicationFlag can be used in or. + * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. * @param { number } userId - Indicates the user ID or do not pass user ID. * @param { AsyncCallback } callback - The callback of getting application info result. * @throws { BusinessError } 201 - Permission denied. @@ -307,7 +305,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } appFlags - Indicates ApplicationFlag, the value in ApplicationFlag can be used in or. + * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. * @param { number } userId - Indicates the user ID or do not pass user ID. * @returns { Promise } The result of getting the application info. * @throws { BusinessError } 201 - Permission denied. @@ -429,7 +427,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. - * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the ExtensionInfo objects that will be returned. + * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the ExtensionAbilityInfo objects that will be returned. * @param { number } userId - Indicates the user ID. * @param { AsyncCallback> } callback - The callback of querying extension ability info result. * @throws { BusinessError } 201 - Permission denied. @@ -898,7 +896,7 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * Obtains applicationInfo based on a given bundleName and bundleFlags. * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } bundleFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned. + * @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned. * @param { number } userId - Indicates the user ID or do not pass user ID. * @returns Returns the ApplicationInfo object. * @throws { BusinessError } 201 - Permission denied. @@ -909,8 +907,8 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; * @systemapi * @since 9 */ - function getApplicationInfoSync(bundleName: string, bundleFlags: number, userId: number) : ApplicationInfo; - function getApplicationInfoSync(bundleName: string, bundleFlags: number) : ApplicationInfo; + function getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number) : ApplicationInfo; + function getApplicationInfoSync(bundleName: string, applicationFlags: number) : ApplicationInfo; /** * Obtains bundleInfo based on bundleName, bundleFlags and options. @@ -966,11 +964,11 @@ import * as _ExtensionAbilityInfo from './bundleManager/extensionAbilityInfo'; export type ReqPermissionDetail = _BundleInfo.ReqPermissionDetail; /** - * Indicates the PermissionGrantStatus. + * Indicates the PermissionGrantState. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 */ - export type PermissionGrantStatus = _BundleInfo.PermissionGrantStatus; + export type PermissionGrantState = _BundleInfo.PermissionGrantState; /** * Indicates the SignatureInfo. diff --git a/api/bundleManager/bundleInfo.d.ts b/api/bundleManager/bundleInfo.d.ts index 2fa975f423..55a81553c5 100644 --- a/api/bundleManager/bundleInfo.d.ts +++ b/api/bundleManager/bundleInfo.d.ts @@ -96,12 +96,12 @@ export interface BundleInfo { readonly reqPermissionDetails: Array; /** - * Indicates the grant status of required permissions - * @type {Array} + * Indicates the grant state of required permissions + * @type {Array} * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 */ - readonly permissionGrantStates: Array; + readonly permissionGrantStates: Array; /** * Indicates the SignatureInfo of the bundle @@ -193,12 +193,12 @@ export interface UsedScene { } /** - * PermissionGrantStatus + * PermissionGrantState * @enum {number} * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since 9 */ - export enum PermissionGrantStatus { + export enum PermissionGrantState { /** * PERMISSION_DENIED * @syscap SystemCapability.BundleManager.BundleFramework.Core -- Gitee