未验证 提交 181bff54 编写于 作者: O openharmony_ci 提交者: Gitee

!5522 solve ActsAmsNewWantTest fail problem

Merge pull request !5522 from zhoujun62/my_xts_acts
......@@ -16,6 +16,10 @@
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
......@@ -48,6 +52,7 @@ export default class MainAbility extends Ability {
}
onForeground() {
sleep(1000)
// Ability has brought to foreground
console.log("ACTS_NewWant MainAbility onForeground")
if (globalThis.abilityWant.action == 'startHapC') {
......
......@@ -16,6 +16,10 @@
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
......@@ -48,6 +52,7 @@ export default class MainAbility extends Ability {
}
onForeground() {
sleep(1000)
// Ability has brought to foreground
console.log("ACTS_NewWant MainAbility onForeground")
if (globalThis.abilityWant.action == 'startHapB') {
......
......@@ -16,6 +16,10 @@
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
......@@ -48,6 +52,7 @@ export default class MainAbility extends Ability {
}
onForeground() {
sleep(1000)
// Ability has brought to foreground
console.log("ACTS_NewWant MainAbility onForeground")
if (globalThis.abilityWant.action == 'startStandard0400') {
......
......@@ -16,6 +16,10 @@
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default class SecondAbility extends Ability {
onCreate(want, launchParam) {
......@@ -48,6 +52,7 @@ export default class SecondAbility extends Ability {
}
onForeground() {
sleep(1000)
// Ability has brought to foreground
var connId;
console.log("ACTS_NewWant SecondAbility onForeground")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册