diff --git a/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/Application/MyAbilityStage.ts b/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/Application/MyAbilityStage.ts index fcfe98e6556dc575ed22fcacb60798df95dd5b91..3bd1b9a29c18300372eb67149f4d3e991588b2b0 100644 --- a/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/Application/MyAbilityStage.ts +++ b/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/Application/MyAbilityStage.ts @@ -1,5 +1,5 @@ /* -* Copyright (c) 2022 Huawei Device Co., Ltd. +* Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,11 +13,11 @@ * limitations under the License. */ -import AbilityStage from "@ohos.app.ability.AbilityStage" +import AbilityStage from "@ohos.app.ability.AbilityStage"; export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.info("ActsStageContextAssistOne StageAbility onCreate") - globalThis.abilityStageContextA = this.context; - } + onCreate() { + console.info("ActsStageContextAssistOne StageAbility onCreate"); + globalThis.abilityStageContextA = this.context; + } } \ No newline at end of file diff --git a/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/MainAbility/DrawnAbility.ts b/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/MainAbility/DrawnAbility.ts index a48c5ad60784ca08a73adbf342d8d664a893b4f0..b8daae9bf8e60d9dc754fd1ca63baa14f2989a7a 100644 --- a/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/MainAbility/DrawnAbility.ts +++ b/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/MainAbility/DrawnAbility.ts @@ -1,5 +1,5 @@ /* -* Copyright (c) 2022 Huawei Device Co., Ltd. +* Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,39 +13,39 @@ * limitations under the License. */ -import Ability from '@ohos.app.ability.UIAbility' -import commonEvent from '@ohos.commonEvent' +import Ability from '@ohos.app.ability.UIAbility'; +import commonEvent from '@ohos.commonEvent'; export default class DrawnAbility extends Ability { - onCreate(want, launchParam) { - console.info('ActsStageContextAssistOne DrawnAbility onCreate') - this.context.reportDrawnCompleted(() => { - console.info('The call to the reportDrawnCompleted interface succeeded'); - }); - } + onCreate(want, launchParam) { + console.info('ActsStageContextAssistOne DrawnAbility onCreate'); + this.context.reportDrawnCompleted(() => { + console.info('The call to the reportDrawnCompleted interface succeeded'); + }); + } - onDestroy() { - console.info('ActsStageContextAssistOne DrawnAbility onDestroy') - } + onDestroy() { + console.info('ActsStageContextAssistOne DrawnAbility onDestroy'); + } - onWindowStageCreate(windowStage) { - console.info('ActsStageContextAssistOne DrawnAbility onWindowStageCreate'); - windowStage.setUIContent(this.context, 'pages/index', null) - } + onWindowStageCreate(windowStage) { + console.info('ActsStageContextAssistOne DrawnAbility onWindowStageCreate'); + windowStage.setUIContent(this.context, 'pages/index', null); + } - onWindowStageDestroy() { - console.info('ActsStageContextAssistOne DrawnAbility onWindowStageDestroy') - } + onWindowStageDestroy() { + console.info('ActsStageContextAssistOne DrawnAbility onWindowStageDestroy'); + } - onForeground() { - console.info('ActsStageContextAssistOne DrawnAbility onForeground'); - globalThis.abilityContextA = this.context; - commonEvent.publish("StartDrawnAbility_CommonEvent_ContextOne", () => { - console.log("Publish StartDrawnAbility_CommonEvent_ContextOne callback"); - }) - } + onForeground() { + console.info('ActsStageContextAssistOne DrawnAbility onForeground'); + globalThis.abilityContextA = this.context; + commonEvent.publish("StartDrawnAbility_CommonEvent_ContextOne", () => { + console.log("Publish StartDrawnAbility_CommonEvent_ContextOne callback"); + }); + } - onBackground() { - console.info('ActsStageContextAssistOne DrawnAbility onBackground'); - } + onBackground() { + console.info('ActsStageContextAssistOne DrawnAbility onBackground'); + } } \ No newline at end of file diff --git a/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/pages/index.ets b/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/pages/index.ets index 46cbf8478ea057c90ac54be87cc5db177cbe3277..7749347641e437a4772a9945631deb7918a70d80 100644 --- a/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/pages/index.ets +++ b/ability/ability_runtime/context/actsstagecontext/ReportDrawnCompletedReply/entry/src/main/ets/pages/index.ets @@ -1,5 +1,5 @@ /* -* Copyright (c) 2022 Huawei Device Co., Ltd. +* Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at