未验证 提交 4dee4587 编写于 作者: O openharmony_ci 提交者: Gitee

!2846 2475 处理完成:WorkSchedulerExtensionAbility接口格式整改

Merge pull request !2846 from ester.zhou/TR-2475
...@@ -11,16 +11,20 @@ import WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility' ...@@ -11,16 +11,20 @@ import WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility'
``` ```
## WorkSchedulerExtensionAbility.onWorkStart ## WorkSchedulerExtensionAbility.onWorkStart
- **System capability**
SystemCapability.ResourceSchedule.WorkScheduler
- **API** onWorkStart(work: workScheduler.WorkInfo): void
onWorkStart(workInfo: WorkInfo);
- **Description**
Triggered when the Work Scheduler task starts. Triggered when the Work Scheduler task starts.
- **Example** **System capability**: SystemCapability.ResourceSchedule.WorkScheduler
**Parameters**
| Name | Type | Mandatory | Description |
| ---- | --------------------- | ---- | -------------- |
| work | [workScheduler.WorkInfo](js-apis-workScheduler.md#workinfo) | Yes | Task to be added to the execution queue.|
**Example**
``` ```
export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility { export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility {
...@@ -31,16 +35,21 @@ Triggered when the Work Scheduler task starts. ...@@ -31,16 +35,21 @@ Triggered when the Work Scheduler task starts.
``` ```
## WorkSchedulerExtensionAbility.onWorkStop ## WorkSchedulerExtensionAbility.onWorkStop
- **System capability**
SystemCapability.ResourceSchedule.WorkScheduler
- **API** onWorkStop(work: workScheduler.WorkInfo)
onWorkStop(workInfo: WorkInfo);
- **Description**
Triggered when the Work Scheduler task stops. Triggered when the Work Scheduler task stops.
- **Example** **System capability**: SystemCapability.ResourceSchedule.WorkScheduler
**Parameters**
| Name | Type | Mandatory | Description |
| ---- | --------------------- | ---- | -------------- |
| work | [workScheduler.WorkInfo](js-apis-workScheduler.md#workinfo) | Yes | Task to be added to the execution queue.|
**Example**
``` ```
export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility { export default class MyWorkSchedulerExtensionAbility extends WorkSchedulerExtensionAbility {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册