From 4e0bd9d0bc69e7895b301487e58172883c7624a2 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Apr 2023 15:01:20 +0800 Subject: [PATCH] add user Signed-off-by: unknown --- .../application-models/create-pageability.md | 16 ++++++++-------- .../reference/apis/js-apis-app-ability-want.md | 4 ++-- .../reference/apis/js-apis-application-want.md | 4 ++-- .../apis/js-apis-inner-ability-want.md | 4 ++-- ...nner-application-serviceExtensionContext.md | 7 +++++++ ...-apis-inner-application-uiAbilityContext.md | 13 +++++++++++++ .../reference/errorcodes/errorcode-ability.md | 18 ++++++++++++++++++ 7 files changed, 52 insertions(+), 14 deletions(-) diff --git a/zh-cn/application-dev/application-models/create-pageability.md b/zh-cn/application-dev/application-models/create-pageability.md index e502fc2be2..c943dceb87 100644 --- a/zh-cn/application-dev/application-models/create-pageability.md +++ b/zh-cn/application-dev/application-models/create-pageability.md @@ -76,22 +76,22 @@ FA模型中,可以通过featureAbility的getContext接口获取应用上下文 通过getContext获取应用上下文并获取分布式目录的示例如下: ```ts -import featureAbility from '@ohos.ability.featureAbility' -import fileIo from '@ohos.fileio' +import featureAbility from '@ohos.ability.featureAbility'; +import fs from '@ohos.file.fs'; (async () => { - let dir: string + let dir: string; try { - console.info('Begin to getOrCreateDistributedDir') - dir = await featureAbility.getContext().getOrCreateDistributedDir() + console.info('Begin to getOrCreateDistributedDir'); + dir = await featureAbility.getContext().getOrCreateDistributedDir(); console.info('distribute dir is ' + dir) } catch (error) { - console.error('getOrCreateDistributedDir failed with ' + error) + console.error('getOrCreateDistributedDir failed with ' + error); } let fd: number; let path = dir + "/a.txt"; - fd = fileIo.openSync(path, 0o2 | 0o100, 0o666); - fileIo.close(fd); + fd = fs.openSync(path, fs.OpenMode.READ_WRITE).fd; + fs.close(fd); })() ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md index f0fef9e181..0dd44d5b87 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md @@ -109,10 +109,10 @@ import Want from '@ohos.app.ability.Want'; ``` * 文件描述符(FD) ```ts - import fileio from '@ohos.fileio'; + import fs from '@ohos.file.fs'; let fd; try { - fd = fileio.openSync('/data/storage/el2/base/haps/pic.png'); + fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd; } catch(e) { console.log('openSync fail:' + JSON.stringify(e)); } diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-want.md b/zh-cn/application-dev/reference/apis/js-apis-application-want.md index 7d6de5e4ed..50d0f58165 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-application-want.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-want.md @@ -108,10 +108,10 @@ import Want from '@ohos.application.Want'; ``` * 文件描述符(FD) ```ts - import fileio from '@ohos.fileio'; + import fs from '@ohos.file.fs'; let fd; try { - fd = fileio.openSync('/data/storage/el2/base/haps/pic.png'); + fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd; } catch(e) { console.log('openSync fail:' + JSON.stringify(e)); } diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md index eb39f0e498..f408cfa6e6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md @@ -41,12 +41,12 @@ Want是对象间信息传递的载体, 可以用于应用组件间的信息传 - 传递FD(文件描述符)数据(在UIAbility对象中调用,其中示例中的context为UIAbility的上下文对象) ```ts - import fileio from '@ohos.fileio';; + import fs from '@ohos.file.fs'; // ... let fd; try { - fd = fileio.openSync('/data/storage/el2/base/haps/pic.png'); + fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd; } catch(e) { console.log('openSync fail:' + JSON.stringify(e)); } diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md index 4f9580d7b0..86e185e2e7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md @@ -55,6 +55,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void; | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -128,6 +129,7 @@ startAbility(want: Want, options?: StartOptions): Promise\; | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -199,6 +201,7 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void& | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -277,6 +280,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -354,6 +358,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -440,6 +445,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -1348,6 +1354,7 @@ startAbilityByCall(want: Want): Promise<Caller>; | 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000008 | Crowdtest App Expiration. | | 16000009 | Can not start ability in wukong mode. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal Error. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md index 6999d6b19f..65e971c4f5 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md @@ -52,6 +52,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void; | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -118,6 +119,7 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void& | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -192,6 +194,7 @@ startAbility(want: Want, options?: StartOptions): Promise<void>; | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -263,6 +266,7 @@ startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -333,6 +337,7 @@ startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -413,6 +418,7 @@ startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityRes | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -480,6 +486,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -549,6 +556,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -626,6 +634,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -1583,6 +1592,7 @@ startAbilityByCall(want: Want): Promise<Caller>; | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -1688,6 +1698,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -1756,6 +1767,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -1826,6 +1838,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md b/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md index b0bdef10a1..f22839136d 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md @@ -186,6 +186,24 @@ Context does not exist. 请检查上下文对象是否可用。 +## 16000017 上一个Ability未启动完成,先缓存在队列中等待后续启动。 + +**错误信息** + +The previous ability is starting, wait start later. + +**错误描述** + +需要启动的Ability过多,由于系统处理能力有限,会先将请求缓存在队列中,按照顺序依次处理。 + +**可能原因** + +系统并发大。 + +**处理步骤** + +无需处理,等待启动即可。 + ## 16000050 内部错误 **错误信息** -- GitLab