提交 fb6f85c7 编写于 作者: R RayShih

fix review problems

Signed-off-by: NRayShih <shirui721@huawei.com>
上级 daae3993
...@@ -62,32 +62,31 @@ featureAbility.startAbility({ ...@@ -62,32 +62,31 @@ featureAbility.startAbility({
entities: [""], entities: [""],
type: "", type: "",
options: { options: {
// indicates the grant to perform read operations on the URI // Grant the permission to perform read operations on the URI.
authReadUriPermission: true, authReadUriPermission: true,
// indicates the grant to perform write operations on the URI // Grant the permission to perform write operations on the URI.
authWriteUriPermission: true, authWriteUriPermission: true,
// support forward intent result to origin ability // support forwarding the intent result to the ability.
abilityForwardResult: true, abilityForwardResult: true,
// used for marking the ability start-up is triggered by continuation // Enable abiligy continuation.
abilityContinuation: true, abilityContinuation: true,
// specifies whether a component does not belong to ohos // Specify that a component does not belong to ohos.
notOhosComponent: true, notOhosComponent: true,
// specifies whether an ability is started // Specify that an ability is started.
abilityFormEnabled: true, abilityFormEnabled: true,
// indicates the grant for possible persisting on the URI. // Grant the permission for possible persisting on the URI.
authPersistableUriPermission: true, authPersistableUriPermission: true,
// indicates the grant for possible persisting on the URI. // Grant the permission for possible persisting on the prefix URI.
authPrefixUriPermission: true, authPrefixUriPermission: true,
// support distributed scheduling system start up multiple devices // Support distributed scheduling system startup on multiple devices.
abilitySliceMultiDevice: true, abilitySliceMultiDevice: true,
// indicates that an ability using the service template is started regardless of whether the // A service ability is started regardless of whether the host application has been started.
// host application has been started.
startForegroundAbility: true, startForegroundAbility: true,
// install the specified ability if it's not installed. // Install the specified ability if it is not installed.
installOnDemand: true, installOnDemand: true,
// return result to origin ability slice // Return the result to the ability slice.
abilitySliceForwardResult: true, abilitySliceForwardResult: true,
// install the specified ability with background mode if it's not installed. // Install the specified ability with background mode if it is not installed.
installWithBackgroundMode: true installWithBackgroundMode: true
}, },
deviceId: "", deviceId: "",
......
...@@ -719,8 +719,8 @@ distroFilter示例: ...@@ -719,8 +719,8 @@ distroFilter示例:
"screenWindow": { "screenWindow": {
"policy": "include", "policy": "include",
"value": ["454*454","466*466"] "value": ["454*454","466*466"]
} },
“screenDensity”:{ "screenDensity":{
"policy": "exclude", "policy": "exclude",
"value": ["ldpi","xldpi"] "value": ["ldpi","xldpi"]
}, },
......
...@@ -1095,7 +1095,7 @@ bundle.getAbilityIcon(bundleName, abilityName) ...@@ -1095,7 +1095,7 @@ bundle.getAbilityIcon(bundleName, abilityName)
getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback\<image.PixelMap>): void; getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback\<image.PixelMap>): void;
以异步方法通过bundleName和abilityName获取对应的[PixelMap](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-image.md),使用callback形式返回结果。 以异步方法通过bundleName和abilityName获取对应Icon[PixelMap](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-image.md),使用callback形式返回结果。
**需要权限:** **需要权限:**
......
...@@ -10,10 +10,10 @@ Ability的上下文环境,继承自Context。 ...@@ -10,10 +10,10 @@ Ability的上下文环境,继承自Context。
## 使用说明 ## 使用说明
​在使用AbilityContext的功能前,需要通过Ability子类实例获取。 在使用AbilityContext的功能前,需要通过Ability子类实例获取。
```js ```js
import Ability from '@ohos.application.Ability' import Ability from '@ohos.application.Ability'
class MainAbility extends Ability { class MainAbility extends Ability {
...@@ -250,7 +250,7 @@ terminateSelf(callback: AsyncCallback&lt;void&gt;): void; ...@@ -250,7 +250,7 @@ terminateSelf(callback: AsyncCallback&lt;void&gt;): void;
```js ```js
this.context.terminateSelf((err) => { this.context.terminateSelf((err) => {
console.log('terminateSelf result:' + JSON.stringfy(err)); console.log('terminateSelf result:' + JSON.stringify(err));
}); });
``` ```
...@@ -273,9 +273,9 @@ terminateSelf(): Promise&lt;void&gt;; ...@@ -273,9 +273,9 @@ terminateSelf(): Promise&lt;void&gt;;
```js ```js
this.context.terminateSelf(want).then((data) => { this.context.terminateSelf(want).then((data) => {
console.log('success:' + JSON.stringfy(data)); console.log('success:' + JSON.stringify(data));
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringfy(error)); console.log('failed:' + JSON.stringify(error));
}); });
``` ```
...@@ -404,7 +404,7 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;, requestCallback: As ...@@ -404,7 +404,7 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;, requestCallback: As
``` ```
this.context.requestPermissionsFromUser(permissions,(result) => { this.context.requestPermissionsFromUser(permissions,(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); console.log('requestPermissionsFromUserresult:' + JSON.stringify(result));
}); });
``` ```
...@@ -433,9 +433,9 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;) : Promise&lt;Permis ...@@ -433,9 +433,9 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;) : Promise&lt;Permis
``` ```
this.context.requestPermissionsFromUser(permissions).then((data) => { this.context.requestPermissionsFromUser(permissions).then((data) => {
console.log('success:' + JSON.stringfy(data)); console.log('success:' + JSON.stringify(data));
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringfy(error)); console.log('failed:' + JSON.stringify(error));
}); });
``` ```
...@@ -459,7 +459,7 @@ setMissionLabel(label: string, callback:AsyncCallback&lt;void&gt;): void; ...@@ -459,7 +459,7 @@ setMissionLabel(label: string, callback:AsyncCallback&lt;void&gt;): void;
```js ```js
this.context.setMissionLabel("test",(result) => { this.context.setMissionLabel("test",(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result)); console.log('requestPermissionsFromUserresult:' + JSON.stringify(result));
}); });
``` ```
...@@ -488,9 +488,9 @@ setMissionLabel(label: string): Promise&lt;void&gt; ...@@ -488,9 +488,9 @@ setMissionLabel(label: string): Promise&lt;void&gt;
```js ```js
this.context.setMissionLabel("test").then((data) => { this.context.setMissionLabel("test").then((data) => {
console.log('success:' + JSON.stringfy(data)); console.log('success:' + JSON.stringify(data));
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringfy(error)); console.log('failed:' + JSON.stringify(error));
}); });
``` ```
...@@ -9,8 +9,6 @@ Ability对应的任务信息。 ...@@ -9,8 +9,6 @@ Ability对应的任务信息。
## 导入模块 ## 导入模块
使用前需导入Want
``` ```
import Want from '@ohos.application.Want'; import Want from '@ohos.application.Want';
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
## 导入模块 ## 导入模块
使用前需导入ElementName和image
``` ```
import { ElementName } from '../bundle/elementName'; import { ElementName } from '../bundle/elementName';
......
...@@ -9,7 +9,7 @@ missionManager模块提供系统任务管理能力,开发者可以对系统任 ...@@ -9,7 +9,7 @@ missionManager模块提供系统任务管理能力,开发者可以对系统任
## 导入模块 ## 导入模块
``` ```
import missionManager from '@ohos.application.missionManager' import missionManager from '@ohos.application.missionManager'
...@@ -390,9 +390,10 @@ unlockMission(missionId: number, callback: AsyncCallback&lt;void&gt;): void; ...@@ -390,9 +390,10 @@ unlockMission(missionId: number, callback: AsyncCallback&lt;void&gt;): void;
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| missionId | number | 是 | 任务ID。 | | missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**示例:** **示例:**
...@@ -620,7 +621,7 @@ moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCall ...@@ -620,7 +621,7 @@ moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCall
moveMissionToFront(missionId: number, options?: StartOptions): Promise&lt;void&gt;; moveMissionToFront(missionId: number, options?: StartOptions): Promise&lt;void&gt;;
把指定任务id的任务切到前台,以promise的方式返回。 把指定任务id的任务切到前台,同时指定任务切换到前台时的启动参数,例如窗口模式、设备ID等,以promise的方式返回。
**系统能力**:SystemCapability.Ability.AbilityRuntime.Mission **系统能力**:SystemCapability.Ability.AbilityRuntime.Mission
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册