未验证 提交 6ca007c3 编写于 作者: O openharmony_ci 提交者: Gitee

!16809 修复过期函数

Merge pull request !16809 from jerry/OpenHarmony-3.2-Release
......@@ -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);
})()
```
......@@ -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));
}
......
......@@ -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));
}
......
......@@ -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));
}
......
......@@ -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\<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. |
......@@ -199,6 +201,7 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback&lt;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&lt;Caller&gt;;
| 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. |
**示例:**
......
......@@ -52,6 +52,7 @@ startAbility(want: Want, callback: AsyncCallback&lt;void&gt;): 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&lt;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&lt;void&gt;;
| 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&lt;AbilityResult&gt;):
| 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&lt;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&lt;Caller&gt;;
| 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. |
......
......@@ -186,6 +186,24 @@ Context does not exist.
请检查上下文对象是否可用。
## 16000017 上一个Ability未启动完成,先缓存在队列中等待后续启动。
**错误信息**
The previous ability is starting, wait start later.
**错误描述**
需要启动的Ability过多,由于系统处理能力有限,会先将请求缓存在队列中,按照顺序依次处理。
**可能原因**
系统并发大。
**处理步骤**
无需处理,等待启动即可。
## 16000050 内部错误
**错误信息**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册