提交 93ffa4e6 编写于 作者: X xinking129

modify code

Signed-off-by: Nxinking129 <xinxin13@huawei.com>
上级 ee10ffb1
/*
* 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
/*
* 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
/*
* 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册