From c8a298a54afca548d82885b58327e553a575d770 Mon Sep 17 00:00:00 2001 From: Lotol Date: Sat, 28 Jan 2023 07:39:34 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20e47e44f=20from=20https://gitee.com/loto?= =?UTF-8?q?l/docs/pulls/13912=20=E5=8C=85=E7=AE=A1=E7=90=86=E8=B5=84?= =?UTF-8?q?=E6=96=99=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lotol --- .../reference/apis/js-apis-appControl.md | 12 ++++++------ .../reference/apis/js-apis-bundleManager.md | 16 +++++++++------- .../reference/apis/js-apis-installer.md | 3 +-- .../reference/apis/js-apis-system-package.md | 12 +++++++----- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-appControl.md b/zh-cn/application-dev/reference/apis/js-apis-appControl.md index c8a6d76f55..0f0b848a20 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-appControl.md +++ b/zh-cn/application-dev/reference/apis/js-apis-appControl.md @@ -45,7 +45,7 @@ setDisposedStatus(appId: string, disposedWant: Want): Promise\ | 错误码ID | 错误信息 | | ------ | -------------------------------------- | -| 17700005 | The specified app ID is not found. | +| 17700005 | The specified app ID is empty string. | **示例:** @@ -91,7 +91,7 @@ setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback\; | 错误码ID | 错误信息 | | ------ | -------------------------------------- | -| 17700005 | The specified app ID is not found. | +| 17700005 | The specified app ID is empty string. | **示例:** @@ -186,7 +186,7 @@ getDisposedStatus(appId: string, callback: AsyncCallback\): void; | 错误码ID | 错误信息 | | ------ | -------------------------------------- | -| 17700005 | The specified app ID is not found. | +| 17700005 | The specified app ID is empty string. | **示例:** @@ -236,7 +236,7 @@ deleteDisposedStatus(appId: string): Promise\ | 错误码ID | 错误信息 | | ------ | -------------------------------------- | -| 17700005 | The specified app ID is not found. | +| 17700005 | The specified app ID is empty string. | **示例:** @@ -280,7 +280,7 @@ deleteDisposedStatus(appId: string, callback: AsyncCallback\) : void | 错误码ID | 错误信息 | | ------ | -------------------------------------- | -| 17700005 | The specified app ID is not found. | +| 17700005 | The specified app ID is empty string. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md index b3615dbf1a..2116ec5f32 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md @@ -2235,8 +2235,8 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName: strin | 错误码ID | 错误信息 | | -------- | ------------------------------------------------------------ | -| 17700002 | The specified moduleName does not exist. | -| 17700003 | The specified abilityName does not exist. | +| 17700002 | The specified moduleName is not existed. | +| 17700003 | The specified abilityName is not existed. | | 17700024 | Failed to get the profile because there is no profile in the HAP. | | 17700026 | The specified bundle is disabled. | | 17700029 | The specified ability is disabled. | @@ -2291,8 +2291,8 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName?: stri | 错误码ID | 错误信息 | | -------- | ------------------------------------------------------------ | -| 17700002 | The specified moduleName does not exist. | -| 17700003 | The specified abilityName does not exist. | +| 17700002 | The specified moduleName is not existed. | +| 17700003 | The specified abilityName is not existed. | | 17700024 | Failed to get the profile because there is no profile in the HAP. | | 17700026 | The specified bundle is disabled. | | 17700029 | The specified ability is disabled. | @@ -2356,7 +2356,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m | 错误码ID | 错误信息 | | -------- | ------------------------------------------------------------ | -| 17700002 | The specified moduleName does not exist. | +| 17700002 | The specified moduleName is not existed. | | 17700003 | The specified extensionAbilityName not existed. | | 17700024 | Failed to get the profile because there is no profile in the HAP. | | 17700026 | The specified bundle is disabled. | @@ -2411,7 +2411,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m | 错误码ID | 错误信息 | | -------- | ------------------------------------------------------------ | -| 17700002 | The specified moduleName does not exist. | +| 17700002 | The specified moduleName is not existed. | | 17700003 | The specified extensionAbilityName not existed. | | 17700024 | Failed to get the profile because there is no profile in the HAP. | | 17700026 | The specified bundle is disabled. | @@ -2770,6 +2770,7 @@ try { ### bundleManager.getApplicationInfoSync getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number) : [ApplicationInfo](js-apis-bundleManager-applicationInfo.md); +getApplicationInfoSync(bundleName: string, applicationFlags: number) : [ApplicationInfo](js-apis-bundleManager-applicationInfo.md); 以同步方法根据给定的bundleName、applicationFlags和userId获取ApplicationInfo。 @@ -2785,7 +2786,7 @@ getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: num | ----------- | ------ | ---- | ----------------------------------------------------------| | bundleName | string | 是 | 表示应用程序的bundleName。 | | applicationFlags | [number](#applicationflag) | 是 | 表示用于指定将返回的ApplicationInfo对象中包含的信息。 | -| userId | number | 否 | 表示用户ID。 | +| userId | number | 是 | 表示用户ID。 | **返回值:** @@ -2837,6 +2838,7 @@ try { ### bundleManager.getBundleInfoSync getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag), userId: number): [BundleInfo](js-apis-bundleManager-bundleInfo.md); +getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag)): [BundleInfo](js-apis-bundleManager-bundleInfo.md); 以同步方法根据给定的bundleName、bundleFlags和userId获取BundleInfo。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-installer.md b/zh-cn/application-dev/reference/apis/js-apis-installer.md index a4252ab66c..2514a26dca 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-installer.md +++ b/zh-cn/application-dev/reference/apis/js-apis-installer.md @@ -116,8 +116,7 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback: | 17700015 | Failed to install the HAPs because they have different configuration information. | | 17700016 | Failed to install the HAP because of insufficient system disk space. | | 17700017 | Failed to install the HAP since the version of the HAP to install is too early. | -| 17700101 | The system service is excepted. | -| 17700103 | I/O operation is failed. | +| 17700018 | Failed to install because the dependent module does not exist. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-package.md b/zh-cn/application-dev/reference/apis/js-apis-system-package.md index 4369b30fd9..d6fe62baaa 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-package.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-package.md @@ -19,11 +19,11 @@ import package from '@system.package'; ## package.hasInstalled(deprecated) > 从API version 9开始不再维护,推荐使用该模块[@ohos.bundle.bundleManager](js-apis-bundleManager.md)。 -hasInstalled(Object): void +hasInstalled(options: CheckPackageHasInstalledOptions): void 查询指定应用是否存在,或者原生应用是否安装。 -**需要权限:** ohos.permission.GET_BUNDLE_INFO +**需要权限:** None **系统能力:** SystemCapability.BundleManager.BundleFramework @@ -65,9 +65,9 @@ export default { **系统能力:** SystemCapability.BundleManager.BundleFramework。 -| 名称 | 类型 | 说明 | -| --- | --- | ---- | -| result | boolean | 指示应用是否已安装。 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------- | -------- | -------- | +|result | boolean | 是 | 指示应用是否已安装。 | ## CheckPackageHasInstalledOptions @@ -75,6 +75,8 @@ export default { 查询包是否已安装时的选项。 +**系统能力:** SystemCapability.BundleManager.BundleFramework + | 名称 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | bundleName | string | 是 | 应用包名。 | -- GitLab