未验证 提交 5236a717 编写于 作者: O openharmony_ci 提交者: Gitee

!2409 Fix error code issue of ability api in March 23rd

Merge pull request !2409 from yuyaozhi/master
......@@ -82,13 +82,11 @@ isRamConstrainedDevice(): Promise\<boolean>;
**示例:**
```js
IsRamConstrainedDevicePromise(){
app.isRamConstrainedDevicePromise().then((data) => {
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringify(error));
});
}
```
## appManager.isRamConstrainedDevice
......@@ -108,12 +106,10 @@ isRamConstrainedDevice(callback: AsyncCallback\<boolean>): void;
**示例:**
```js
IsRamConstrainedDeviceCallBack(){
app.isRamConstrainedDevicePromise((err, data) => {
console.log('startAbility result failed:' + JSON.stringify(err));
console.log('startAbility result success:' + JSON.stringify(data));
})
}
```
## appManager.getAppMemorySize
......@@ -133,13 +129,11 @@ getAppMemorySize(): Promise\<number>;
**示例:**
```js
GetAppMemorySize(){
app.getAppMemorySize().then((data) => {
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringify(error));
});
}
```
## appManager.getAppMemorySize
......@@ -159,12 +153,10 @@ getAppMemorySize(callback: AsyncCallback\<number>): void;
**示例:**
```js
GetAppMemorySizeCallBack(){
app.getAppMemorySize((err, data) => {
console.log('startAbility result failed :' + JSON.stringify(err));
console.log('startAbility result success:' + JSON.stringify(data));
})
}
```
## appManager.getProcessRunningInfos<sup>8+</sup>
......@@ -183,13 +175,11 @@ getProcessRunningInfos(): Promise<Array<ProcessRunningInfo>>;
**示例:**
```js
GetProcessRunningInfos(){
app.GetProcessRunningInfos().then((data) => {
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringify(error));
});
}
```
## appManager.getProcessRunningInfos<sup>8+</sup>
......@@ -209,12 +199,10 @@ getProcessRunningInfos(callback: AsyncCallback<Array<ProcessRunningInfo>>): void
**示例:**
```js
GetProcessRunningInfosCallBack(){
app.GetProcessRunningInfos((err, data) => {
console.log('startAbility result failed :' + JSON.stringify(err));
console.log('startAbility result success:' + JSON.stringify(data));
})
}
```
## ProcessRunningInfo
......
......@@ -665,9 +665,7 @@ getWindow(callback: AsyncCallback\<window.Window>): void
**示例:**
```javascript
GetWindow(){
featureAbility.getWindow()
}
```
## featureAbility.getWindow<sup>7+</sup>
......@@ -687,11 +685,9 @@ getWindow(): Promise\<window.Window>;
**示例:**
```javascript
GetWindowPromise(){
featureAbility.getWindow().then((data) => {
console.info("=============getWindowPromise========== " + JSON.stringify(data));
});
}
});
```
## ConnectOptions.onConnect<sup>7+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册