Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
4f7401f9
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
4f7401f9
编写于
11月 28, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 28, 2022
浏览文件
操作
浏览文件
下载
差异文件
!11911 修改包管理资料缺陷:bundleManager
Merge pull request !11911 from Lotol/master2
上级
d333ea4b
53ea3af8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
36 addition
and
34 deletion
+36
-34
zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
...n/application-dev/reference/apis/js-apis-bundleManager.md
+36
-34
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-bundleManager.md
浏览文件 @
4f7401f9
...
...
@@ -206,10 +206,6 @@ getBundleInfoForSelf(bundleFlags: [number](#bundleflag)): Promise\<[BundleInfo](
| ----------------------------------------------------------- | ------------------------------------- |
| Promise
\<
[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
> | Promise对象,返回当前应用的BundleInfo。|
**错误码:**
错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
**示例:**
```
ts
...
...
@@ -241,10 +237,6 @@ getBundleInfoForSelf(bundleFlags: [number](#bundleflag), callback: AsyncCallback
| bundleFlags |
[
number
](
#bundleflag
)
| 是 | 指定返回的BundleInfo所包含的信息。 |
| callback | AsyncCallback
\<
[
BundleInfo
](
js-apis-bundleManager-bundleInfo.md
)
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的当前应用的BundleInfo;否则为错误对象。 |
**错误码:**
以下错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
**示例:**
```
ts
...
...
@@ -292,7 +284,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback:
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -364,7 +356,7 @@ getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback\<
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user ID is not found. |
| 17700004 | The specified user ID is not found.
|
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -420,7 +412,7 @@ getBundleInfo(bundleName: string, bundleFlags: [number](#bundleflag), userId?: n
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -488,10 +480,10 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
| 17700026 | The specified bundle is disabled. |
**示例:**
**示例:**
```
ts
import
bundleManager
from
'
@ohos.bundle.bundleManager
'
...
...
@@ -539,6 +531,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), cal
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user ID is not found. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -594,7 +587,7 @@ getApplicationInfo(bundleName: string, appFlags: [number](#applicationflag), use
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -642,7 +635,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId: number, callback: A
| 错误码ID | 错误信息 |
| -------- | --------------------------------- |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
**示例:**
...
...
@@ -687,6 +680,10 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), callback: AsyncCallback<Arr
错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误信息 |
| -------- | ---------------------------------- |
| 17700004 | The specified user ID is not found. |
**示例:**
```
ts
...
...
@@ -737,7 +734,7 @@ getAllBundleInfo(bundleFlags: [number](#bundleflag), userId?: number): Promise<A
| 错误码ID | 错误信息 |
| -------- | ---------------------------------- |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
**示例:**
...
...
@@ -782,7 +779,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId: number, call
| 错误码ID | 错误信息 |
| -------- | ---------------------------------- |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
**示例:**
...
...
@@ -827,6 +824,10 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), callback: AsyncCallb
错误码的详细介绍请参见
[
ohos.bundle错误码
](
../errorcodes/errorcode-bundle.md
)
。
| 错误码ID | 错误信息 |
| -------- | ---------------------------------- |
| 17700004 | The specified user ID is not found. |
**示例:**
```
ts
...
...
@@ -877,7 +878,7 @@ getAllApplicationInfo(appFlags: [number](#applicationflag), userId?: number): Pr
| 错误码ID | 错误信息 |
| -------- | ---------------------------------- |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
**示例:**
...
...
@@ -982,7 +983,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), callback: Asy
| -------- | -------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700003 | The specified ability is not found. |
| 17700004 | The specified userId is invalid. |
| 17700004 | The specified userId is invalid.
|
| 17700026 | The specified bundle is disabled. |
| 17700029 | The specified ability is disabled. |
...
...
@@ -1042,7 +1043,7 @@ queryAbilityInfo(want: Want, abilityFlags: [number](#abilityflag), userId?: numb
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700003 | The specified
a
bility is not found. |
| 17700003 | The specified
extensionA
bility is not found. |
| 17700004 | The specified userId is invalid. |
| 17700026 | The specified bundle is disabled. |
| 17700029 | The specified ability is disabled. |
...
...
@@ -1175,7 +1176,7 @@ queryExtensionAbilityInfo(want: Want, extensionAbilityType: [ExtensionAbilityTyp
| -------- | -------------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700003 | The specified extensionAbility is not found. |
| 17700004 | The specified userId is invalid.
|
| 17700004 | The specified userId is invalid. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -1502,7 +1503,7 @@ cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback\<void>): void;
| 错误码ID | 错误信息 |
| -------- | ------------------------------------------------------------ |
| 17700001 | The specified bundleName is not found. |
| 17700030 | The specified bundle
Name does not support cleaning
cache files. |
| 17700030 | The specified bundle
does not support clearing of
cache files. |
**示例:**
...
...
@@ -2032,7 +2033,7 @@ getLaunchWantForBundle(bundleName: string, userId: number, callback: AsyncCallba
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user
Id is not found.
|
| 17700004 | The specified user
ID is not found
|
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -2081,7 +2082,7 @@ getLaunchWantForBundle(bundleName: string, callback: AsyncCallback\<Want>): void
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user ID is not found
.
|
| 17700004 | The specified user ID is not found
|
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -2135,7 +2136,7 @@ getLaunchWantForBundle(bundleName: string, userId?: number): Promise\<Want>;
| 错误码ID | 错误信息 |
| -------- | --------------------------------------|
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -2181,7 +2182,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName: strin
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed. |
| 17700003 | The specified abilityName is not existed. |
| 17700024 |
The specified metadataName is not existed or the profile is not json-format
. |
| 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. |
...
...
@@ -2236,7 +2237,7 @@ getProfileByAbility(moduleName: string, abilityName: string, metadataName?: stri
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed. |
| 17700003 | The specified abilityName is not existed. |
| 17700024 |
The specified metadataName is not existed or the profile is not json-format
. |
| 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. |
...
...
@@ -2284,7 +2285,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名
| 类型 | 必填 | 说明 |
| -------------------- | ----------------------------- | ---- | ------------------------------------------------------------ |
| moduleName | string | 是 | 表示应用程序的moduleName。 |
| extensionAbilityName | string | 是 | 表示应用程序的extensionAbilityName。 |
...
...
@@ -2299,7 +2300,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed. |
| 17700003 | The specified extensionAbilityName is not existed. |
| 17700024 |
The specified metadataName is not existed or the profile is not json-format
. |
| 17700024 |
Failed to get the profile because there is no profile in the HAP
. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -2333,7 +2334,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名
| 类型 | 必填 | 说明 |
| -------------------- | ------ | ---- | ---------------------------------- |
| moduleName | string | 是 | 表示应用程序的moduleName。 |
| extensionAbilityName | string | 是 | 表示应用程序的extensionAbilityName。 |
...
...
@@ -2353,7 +2354,7 @@ getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, m
| -------- | ------------------------------------------------------------ |
| 17700002 | The specified moduleName is not existed. |
| 17700003 | The specified extensionAbilityName is not existed. |
| 17700024 |
The specified metadataName is not existed or the profile is not json-format
. |
| 17700024 |
Failed to get the profile because there is no profile in the HAP
. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -2399,7 +2400,7 @@ getPermissionDef(permissionName: string, callback: AsyncCallback\<[PermissionDef
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名
| 类型 | 必填 | 说明 |
| -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| permissionName | string | 是 | 表示权限名称。 |
| callback | AsyncCallback
\<
[
PermissionDef
](
js-apis-bundleManager-permissionDef.md
)
> | 是 | 回调函数,当获取成功时,err为null,data为获取到的Array
\<
PermissionDef>;否则为错误对象。 |
...
...
@@ -2444,7 +2445,7 @@ getPermissionDef(permissionName: string): Promise\<[PermissionDef](js-apis-bundl
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名
| 类型 | 必填 | 说明 |
| -------------- | ------ | ---- | -------------- |
| permissionName | string | 是 | 表示权限参数名。 |
...
...
@@ -2834,7 +2835,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag), userId
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user
Id
is not found. |
| 17700004 | The specified user
ID
is not found. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
@@ -2885,6 +2886,7 @@ getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag)): [Bund
| 错误码ID | 错误信息 |
| -------- | ------------------------------------- |
| 17700001 | The specified bundleName is not found. |
| 17700004 | The specified user ID is not found. |
| 17700026 | The specified bundle is disabled. |
**示例:**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录