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

!5556 Solve XTS ActsAmsNewWantTest and ActsfwkDataAccessorTest fail problem

Merge pull request !5556 from zhoujun62/OpenHarmony-3.2-Beta3
......@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dataAbility from '@ohos.data.dataAbility'
import featureAbility from '@ohos.ability.featureAbility'
import dataAbility from '@ohos.data.dataAbility'
import fileio from '@ohos.fileio'
import dataRdb from '@ohos.data.rdb'
......
......@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dataAbility from '@ohos.data.dataAbility'
import featureAbility from '@ohos.ability.featureAbility'
import dataAbility from '@ohos.data.dataAbility'
import fileio from '@ohos.fileio'
import dataRdb from '@ohos.data.rdb'
......
......@@ -12,8 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dataAbility from '@ohos.data.dataAbility'
import featureAbility from '@ohos.ability.featureAbility'
import dataAbility from '@ohos.data.dataAbility'
import fileio from '@ohos.fileio'
import dataRdb from '@ohos.data.rdb'
......
......@@ -16,6 +16,15 @@
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
......@@ -48,6 +57,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,15 @@
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
......@@ -48,6 +57,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,15 @@
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
// Ability is creating, initialize resources for this ability
......@@ -48,6 +57,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,15 @@
import Ability from '@ohos.application.Ability'
import commonEvent from '@ohos.commonEvent'
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
export default class SecondAbility extends Ability {
onCreate(want, launchParam) {
......@@ -48,6 +57,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.
先完成此消息的编辑!
想要评论请 注册