diff --git a/ability/ability_runtime/apitest/entry/src/main/ets/MainAbility2/MainAbility2.ts b/ability/ability_runtime/apitest/entry/src/main/ets/MainAbility2/MainAbility2.ts index 9855da30bcff3c0e78127021a8a7b45d154e3ff8..f182429412cd553f67162311b079a60ff71d902c 100644 --- a/ability/ability_runtime/apitest/entry/src/main/ets/MainAbility2/MainAbility2.ts +++ b/ability/ability_runtime/apitest/entry/src/main/ets/MainAbility2/MainAbility2.ts @@ -38,7 +38,9 @@ export default class MainAbility2 extends Ability { windowStage.setUIContent(this.context, "pages/index", null) windowStage.on('windowStageEvent', (data)=>{ if(data == 2){ - commonEvent.publish("ACTS_DoAbility_Event", PublishCallBackOne); + setTimeout(()=>{ + commonEvent.publish("ACTS_DoAbility_Event", PublishCallBackOne); + }, 2000) } }) }